{"id":"MAL-2026-20956","summary":"Malicious code in confusion-pkg (npm)","details":"confusion-pkg@99.9.9 is a dependency-confusion package with no functional code, published at version 99.9.9 so that it outranks a same-named private package. Its preinstall script runs `node canary.js || true` on npm install, which checks whether /flag.txt, /flag or /app/flag.txt exists and sends an HTTP GET to `hxxp://65.108.241[.]149:8080/canary` with the package name and a found=yes/no flag in the query string, telling the publisher's server that the package was installed and whether a flag file is present. The npm account blabla123124 published confusion-pkg and 2 sibling packages with the same script within four minutes on 2026-12-01.\n\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (3ba0d2c8426dc85ab8f02e50716740e5c62efb7552da4315f91cc01cabbf4853)\nThe 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.\n","modified":"2026-12-03T05:45:05.730021503Z","published":"2026-12-01T14:30:13Z","database_specific":{"iocs":{"ips":["65.108.241.149"],"urls":["http://65.108.241.149:8080/canary"],"files":[{"note":"canary.js of confusion-pkg@99.9.9; GET http://65.108.241.149:8080/canary on install.","paths":["canary.js"],"source":"PACKAGE_ARCHIVE","digests":{"sha256":"356e7a6688c11005d10febedd49bc8979a2d0ab1206ea1b92d6aac04301127d2"}},{"paths":["package.json"],"source":"PACKAGE_ARCHIVE","digests":{"sha256":"5fce86c23a5ca2da68c1865d579714caf47559f936e3d6d2a5bc7f3be8526aca"},"note":"preinstall runs `node canary.js || true`, which checks for CTF flag files and sends a GET to hxxp://65.108.241[.]149:8080/canary."},{"paths":["canary.js"],"source":"PACKAGE_ARCHIVE","digests":{"sha256":"356e7a6688c11005d10febedd49bc8979a2d0ab1206ea1b92d6aac04301127d2"},"note":"Executed by the preinstall script of confusion-pkg@99.9.9."}]},"malicious-packages-origins":[{"import_time":"2026-12-02T07:21:11.994404412Z","modified_time":"2026-12-02T07:08:56Z","sha256":"3ba0d2c8426dc85ab8f02e50716740e5c62efb7552da4315f91cc01cabbf4853","source":"amazon-inspector","versions":["99.9.9"],"id":"IN-MAL-2026-023151"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/confusion-pkg/v/99.9.9"}],"affected":[{"package":{"name":"confusion-pkg","ecosystem":"npm","purl":"pkg:npm/confusion-pkg"},"versions":["99.9.9"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/confusion-pkg/MAL-2026-20956.json","indicators":{"package_integrity":[{"hashes":{"sha512_sri":"sha512-7MxrOQHYiHOYZDLJkVrPDGR/WqsoMn7b9XbgMxFji/UBcDpAAp28NiFK4yxk6JFbC4snXHc7ZPhVba+KtwS/QA==","sha1":"0560783d4fedc65474a6a773e3ddeb3c6b7289ac"},"filename":"confusion-pkg-99.9.9.tgz"}],"evidence_files":[{"sha256":"356e7a6688c11005d10febedd49bc8979a2d0ab1206ea1b92d6aac04301127d2","tlsh":"acf00e8867182b06e5d04278e07f1b8de2f3f1d0ee865882a88c10c316386841fbb8b8","path":"canary.js"}]},"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}]}}],"schema_version":"1.9.2","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"InvisiRisk, Inc.","contact":["https://www.invisirisk.com","mailto:research@invisirisk.com"],"type":"FINDER"}]}