{"id":"MAL-2026-6066","summary":"Malicious code in quirky-token (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (b263413912feb72882ee0b52e7025c636ed98472ba90e6db4714b3b111b4e2e8)\nThe package is advertised as an SVG sanitizer but exposes an undocumented getPlugin() export whose returned function fetches JSON from https://www.jsonkeeper.com/b/3P9BF and passes the response's `model` field directly to eval(). jsonkeeper.com is an anonymous, mutable paste host with no pinning, hash, or signature — whoever controls that paste can execute arbitrary JavaScript in the consumer's Node.js process whenever the returned function is invoked. The malicious block in index.js is appended below a plausible SVG sanitizer/minifier implementation that serves as cover, and both the HTTP error branch and the eval try/catch are empty so failures are silently swallowed. This is a classic dropper pattern: benign cover code, undocumented export, fetch-and-eval from a mutable third-party paste, concealment of errors. Any consumer who imports this package and calls getPlugin() grants the paste operator full RCE on the importer's host.\n\n## Source: ghsa-malware (4693ac90e019c862e43807d5326753f2abaf4595b4f1f27c5c8a1db103334e57)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.\n","aliases":["GHSA-8p89-7m4q-45qm"],"modified":"2026-06-29T17:31:52.401829978Z","published":"2026-06-17T16:37:40Z","database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","sha256":"b263413912feb72882ee0b52e7025c636ed98472ba90e6db4714b3b111b4e2e8","id":"IN-MAL-2026-006904","import_time":"2026-06-17T17:32:18.503990157Z","versions":["1.0.2"],"modified_time":"2026-06-17T16:37:40Z"},{"source":"amazon-inspector","modified_time":"2026-06-18T19:11:57Z","id":"IN-MAL-2026-007030","import_time":"2026-06-18T19:20:03.64521711Z","versions":["1.0.1"],"sha256":"a414b00c83b6fd328d241e0e54f8289cb894be1907656b79df3c2ab6f2bf8537"},{"source":"amazon-inspector","sha256":"bacc77e746838c6cb40f40c42cb4bea12f0789f71055c891ceebf7a5e4ad2b5c","id":"IN-MAL-2026-007029","import_time":"2026-06-18T19:20:03.492793327Z","versions":["1.0.0"],"modified_time":"2026-06-18T19:11:55Z"},{"source":"ghsa-malware","sha256":"4693ac90e019c862e43807d5326753f2abaf4595b4f1f27c5c8a1db103334e57","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"import_time":"2026-06-29T17:14:01.25953539Z","modified_time":"2026-06-29T14:18:45Z","id":"GHSA-8p89-7m4q-45qm"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/quirky-token/v/1.0.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/quirky-token/v/1.0.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/quirky-token/v/1.0.0"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-8p89-7m4q-45qm"}],"affected":[{"package":{"name":"quirky-token","ecosystem":"npm","purl":"pkg:npm/quirky-token"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.2","1.0.1","1.0.0"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/quirky-token/MAL-2026-6066.json","indicators":{"evidence_files":[{"sha256":"3a0e1400a7ac8e8b984beef2f330af7a144b04723016ef07681ac0294a725444","path":"index.js","tlsh":"767111a8999b7095d6b1e3e447135015f559d1672208c3d4b6acc6983f7172c90f3eec"}],"package_integrity":[{"filename":"quirky-token-1.0.2.tgz","hashes":{"sha1":"402b1e1eca1c2790ed79caa90141b32ed2eeb2b8","sha512_sri":"sha512-7R5LlyUax8IBX0LEMn4UjgWqW5Srw0deTsAp4FtxxWFJaW05kgArzKsVlbLdH/zTAnC9UwdQz2wDwg1MYHU5Fg=="}}]},"cwes":[{"cweId":"CWE-506","name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature."},{"cweId":"CWE-506","name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature."}]}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}