{"id":"MAL-2026-10491","summary":"Malicious code in assertcoreutils (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (1e53b085bfe045b4aeabe9ad77e1066ab0883f27304197377681191c3118b780)\nassertcoreutils impersonates the popular `chai` assertion library: the README, the `chai` keyword, the `lib/chai/` directory layout, and `lib/chai.js` are copied verbatim from chai. When a consumer runs `require('assertcoreutils')`, index.js calls `child_process.spawn('node', ['lib/chai/utils/addAssertion.js',...], { detached: true, stdio: 'ignore' })` followed by `.unref()`, launching a hidden, detached child that survives the parent and produces no console output. `lib/chai/utils/addAssertion.js` is encoded with obfuscator.io string-array / RC4-base64 obfuscation (hex-named identifiers `_0x2ff01b`, `_0x516b`, etc.) that hides a hardcoded HTTPS URL plus query-key; the child performs an HTTPS GET to that URL and passes the response body into `new Function('require', body)(require)`, giving the remote operator arbitrary Node-level code execution on every installer. The combination of typosquat lure, copied legitimate package contents as cover, obfuscated remote URL, detached silent child, and runtime `new Function` over fetched bytes is a supply-chain dropper.\n\n## Source: ghsa-malware (0a5a896a613d498f5908e70719f1b9046f145713db6f66e2c5f4ef101ff46a2b)\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-22qr-5q9r-7v6x"],"modified":"2026-07-15T05:19:45.627269904Z","published":"2026-07-13T21:00:08Z","database_specific":{"malicious-packages-origins":[{"import_time":"2026-07-13T21:25:58.52557665Z","id":"IN-MAL-2026-010315","modified_time":"2026-07-13T21:00:08Z","versions":["2.3.2"],"source":"amazon-inspector","sha256":"1e53b085bfe045b4aeabe9ad77e1066ab0883f27304197377681191c3118b780"},{"modified_time":"2026-07-13T21:00:17Z","versions":["2.3.3"],"source":"amazon-inspector","sha256":"2f936d52739c243822b0bbc6aa90d32c07e6c47f5dfd7360316493b1ab00c625","import_time":"2026-07-13T21:25:58.657332313Z","id":"IN-MAL-2026-010316"},{"import_time":"2026-07-15T05:00:56.768743974Z","id":"GHSA-22qr-5q9r-7v6x","modified_time":"2026-07-14T23:14:24Z","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"source":"ghsa-malware","sha256":"0a5a896a613d498f5908e70719f1b9046f145713db6f66e2c5f4ef101ff46a2b"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/assertcoreutils/v/2.3.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/assertcoreutils/v/2.3.3"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-22qr-5q9r-7v6x"}],"affected":[{"package":{"name":"assertcoreutils","ecosystem":"npm","purl":"pkg:npm/assertcoreutils"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["2.3.2","2.3.3"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"sha256":"0e477809901386e42bb76a346e60741d159eec0e98d8c0409b37c36a91cfe00d","tlsh":"dc214720cd589ee31ada23e8286d001772718d434d54fc1e7baa3b5d0f8d0af657e66d","path":"package.json"},{"sha256":"4291186f3e3d660d46de35995f6a7987936d5b1f6490ac5fe8549b0300b9bb5b","tlsh":"29915e516b807890034fafbb3f2671e9e9265ccbaf04489bd324b82cfd16214d6d6b30","path":"lib/chai/utils/addAssertion.js"},{"path":"index.js","sha256":"e045f0b4ff409bcc00b1c2e74f687501740197295b26b41587f94c7d2f39c3d3","tlsh":"19f0dcfa02c1aa286d31bbf18007442623e3c172f24040a8fafd90d26657b835233cbd"}],"package_integrity":[{"filename":"assertcoreutils-2.3.2.tgz","hashes":{"sha1":"ae8a7d44b5cea077ea678b6f2a62fdd0eb95918b","sha512_sri":"sha512-S36Qm+jDutxRnbaC0EpPB9S2XYRhiIGQB/ekgoJ4T/NiYXMVVt3crxCqhC3iz6HcJN65JJ4MQDaGC0UKnV2VmQ=="}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/assertcoreutils/MAL-2026-10491.json"}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}