{"id":"MAL-2026-20498","summary":"Malicious code in @xokodon430/jsclamp (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (fb7577f8caa11c1f83a285b9542bd8f84c5cd02a695f5f06b037c3c673ea1b1f)\nThe package is advertised as a one-line numeric clamp utility but ships a preinstall lifecycle hook (`node setup.js`) that, on `npm install`, fetches bytes from https://pastebin.com/raw/z6K1Rg8J and https://calcal.ru/p/t5edjvR/raw (first-successful wins), writes them to a random path under the OS tmpdir, and passes the resulting file to a `run()` function. The destinations are author-mutable paste hosts unrelated to the package's stated publisher, and the content is unpinned and unverified. In version 1.0.2 the `run()` function is an empty stub so the fetched bytes are not executed, but the full dropper scaffolding — preinstall trigger, dual-source fetch with failover, staging under tmpdir, handoff to a runner — is present and reachable. Error reporting is obfuscated: HTTP failures surface as `Error #\u003cstatus*13579\u003e` and `process.exit(1)`, concealing which remote host failed and masking that preinstall is reaching Pastebin/calcal.ru. None of this behavior is justified by a 7-line clamp utility.\n","modified":"2026-11-24T17:15:05.430374191Z","published":"2026-11-24T16:40:17Z","database_specific":{"malicious-packages-origins":[{"sha256":"fb7577f8caa11c1f83a285b9542bd8f84c5cd02a695f5f06b037c3c673ea1b1f","source":"amazon-inspector","versions":["1.0.2"],"id":"IN-MAL-2026-023084","import_time":"2026-11-24T17:11:11.257423375Z","modified_time":"2026-11-24T16:40:17Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/@xokodon430/jsclamp/v/1.0.2"}],"affected":[{"package":{"name":"@xokodon430/jsclamp","ecosystem":"npm","purl":"pkg:npm/%40xokodon430/jsclamp"},"versions":["1.0.2"],"database_specific":{"indicators":{"evidence_files":[{"path":"setup.js","sha256":"16d5b66ba42dc7d2f6ed29d57b2c9a504535d22f6138bdd1ad9068fed8cd0ebb","tlsh":"2b21fe5e08732234577123e46b57c83fe222e0832184c702ba2cac813ff10e0d893ead"}],"package_integrity":[{"filename":"jsclamp-1.0.2.tgz","hashes":{"sha1":"dfe1414099d4c03f432792e0892fe604b7206ec5","sha512_sri":"sha512-RNBTx2ZFLc3y5g4SpcSZBL4GjwpPHdcCRzZTAA5tl3QZvpcLxrk+M+GTLRbHw5E8gABghaS7rTIgIpGoMQk4zg=="}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@xokodon430/jsclamp/MAL-2026-20498.json","cwes":[{"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"}]}