{"id":"MAL-2026-17320","summary":"Malicious code in cdn-img-fetch (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (d7922ab741ba357d3d9bb14201acdffd89639cb0b7a8850180d6dd9a8266e9f7)\nOn require() of cdn-img-fetch, index.js unconditionally invokes https.get against https://raw.githubusercontent.com/cavecrew/proj/main/banner.png and pipes the response into a hidden dot-file at os.tmpdir()/._cif_data (written via a.part file and renamed into place). The source is a mutable main-branch URL in a personal GitHub account unrelated to the npm publisher, with no version pin, hash, or signature check, so whoever controls that repo controls the bytes dropped onto the installer's disk on every import. The fetch fires automatically as an IIFE at module load, not from any user-invoked API, and the destination filename is deliberately hidden. The package advertises itself as a CDN image cache helper, which does not explain an import-time download of an opaque file from a third-party personal repo to a hidden tmp location. This is the first-stage dropper / staging shape: the current fetched bytes are written but not executed in this version, but the mechanism gives an off-registry actor a persistent import-time write primitive into every installer's tmp directory.\n","modified":"2026-09-30T05:00:12.088994660Z","published":"2026-09-30T04:38:16Z","database_specific":{"malicious-packages-origins":[{"import_time":"2026-09-30T04:46:52.475923183Z","modified_time":"2026-09-30T04:38:16Z","sha256":"1ba73af34d8c606e15a9ea353fd9e0724f3906a294e01c00f8b566a9501fc939","source":"amazon-inspector","versions":["1.0.0"],"id":"IN-MAL-2026-020806"},{"versions":["1.0.1"],"id":"IN-MAL-2026-020807","import_time":"2026-09-30T04:46:52.523472638Z","modified_time":"2026-09-30T04:38:24Z","sha256":"d7922ab741ba357d3d9bb14201acdffd89639cb0b7a8850180d6dd9a8266e9f7","source":"amazon-inspector"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/cdn-img-fetch/v/1.0.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/cdn-img-fetch/v/1.0.1"}],"affected":[{"package":{"name":"cdn-img-fetch","ecosystem":"npm","purl":"pkg:npm/cdn-img-fetch"},"versions":["1.0.0","1.0.1"],"database_specific":{"cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"index.js","sha256":"430300450f5acbd69c29f02d8c2e243f7d1d6202d1826f6e4d7715f95c47299b","tlsh":"5311ddfb2af22024407371d8a347a82eb243e0037284ca80b99ce2d45fc20344dd2b9c"}],"package_integrity":[{"hashes":{"sha1":"bbe47b192f36c7cbf47d02f35fd1a3448aab7aa2","sha512_sri":"sha512-lQ0CYe38ls2tLv7IhICUTIfG7CXYrERd3zi1OqjbUJOPt+SM/lbpnvit9KB70uG04pWXMyJPMc8Hczun0Ig1nw=="},"filename":"cdn-img-fetch-1.0.0.tgz"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/cdn-img-fetch/MAL-2026-17320.json"}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}