test-pkg-yarn (npm) · Malicious Code
Affects test-pkg-yarnSource GCVE Database
Malicious package : remove test-pkg-yarn and rotate any secrets on hosts that installed it.
Data as of 20 Aug 2026, 14:35 UTC
Malicious package
Published to npm · OSV MAL-2026-6718
What to do
Remove test-pkg-yarn from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmtest-pkg-yarn | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
The npm package 'test-pkg-yarn' versions 1.0.0, 1.0.1, and 1.0.2 contains malicious code that hijacks the 'node' command by symlinking it to a package-controlled script. This script executes arbitrary OS commands at install time, including launching calculator applications, opening a URL in the user's browser, and writing a marker file. The package displays a console message indicating the PATH has been poisoned. Although presented as a proof-of-concept, this behavior results in real code execution during installation and persistent command hijacking.