confusion-pkgnpm
Advisory published Updated
confusion-pkg is a confirmed malicious npm package (MAL-2026-20956) that executes malicious code on install (malicious version 99.9.9). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in confusion-pkg (npm)
What this malware does
The package declares a preinstall lifecycle hook that executes canary.js on npm install. That script checks for the presence of /flag.txt, /flag and /app/flag.txt, reads the contents of whichever exists, and issues an outbound HTTP request to the hardcoded bare IP endpoint http://65.108.241.149:8080/canary, carrying a package marker and the result of the filesystem probe as query parameters. The version string 99.9.9 is implausibly high for the name, a shape used to win dependency resolution against an internally named package. The behavior fires automatically at install time, without user invocation or consent, and sends installer-side filesystem state to an endpoint unrelated to any declared publisher or registry.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Malicious packageFind it
Search your lockfiles and build artifacts for confusion-pkg (version 99.9.9).
If you installed it — respond
Remove confusion-pkg from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.
Did it already run?
If confusion-pkg was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks confusion-pkg-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.