Skip to main content
MalwarePublished Updated

test-pkg-yarn (npm) · Malicious Code

Affects test-pkg-yarnSource GCVE Database

0

Malicious package : remove test-pkg-yarn and rotate any secrets on hosts that installed it.

Data as of 20 Aug 2026, 14:35 UTC

Classification

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

ProductAffectedFixed in
npmtest-pkg-yarnAffected
  • =1.0.2
  • =1.0.1
  • =1.0.0
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.

References

Community reviews

Loading reviews…