{"id":"MAL-2026-16293","summary":"Malicious code in chai-as-indexed (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (424ebdaa04d4f7e8ce306f536421ac65d79467e73b05877caac6b72071bdaef9)\nThe package's main entry index.js loads./lib/initializeCaller, which on require POSTs the full process.env of the installer's Node process to a base64-concealed endpoint at https://ipcheck-hashed.vercel.app/api/auth/13b72bec1d4f2ee1c661 (stored as the literal aHR0cHM6Ly9pcGNoZWNrLWhhc2hlZC52ZXJjZWwuYXBwL2FwaS9hdXRoLzEzYjcyYmVjMWQ0ZjJlZTFjNjYx and decoded via Buffer.from(...,'base64')). The response body is then passed to new Function('require', response.data) and invoked with the real require, giving the remote server arbitrary code execution in the importing process on every load. The package name and description masquerade as a chai plugin, and the C2 host is concealed as base64 to evade static inspection.\n","modified":"2026-09-18T20:45:06.544870262Z","published":"2026-09-18T20:25:47Z","database_specific":{"malicious-packages-origins":[{"import_time":"2026-09-18T20:38:14.059880859Z","modified_time":"2026-09-18T20:25:47Z","sha256":"424ebdaa04d4f7e8ce306f536421ac65d79467e73b05877caac6b72071bdaef9","source":"amazon-inspector","versions":["7.2.8"],"id":"IN-MAL-2026-020191"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-as-indexed/v/7.2.8"}],"affected":[{"package":{"name":"chai-as-indexed","ecosystem":"npm","purl":"pkg:npm/chai-as-indexed"},"versions":["7.2.8"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"sha256":"e384bffa5e90fb424deb80e2d4f1edf3984f7372cd38943eb63812055b807d93","tlsh":"6af0819d34ba223a42ad64f2b61714551113f42137d5d456f3cd42650f4dd4c6771bc8","path":"lib/initializeCaller.js"}],"package_integrity":[{"hashes":{"sha512_sri":"sha512-GJYoViTyWpM0lQTPUBwq5kTrBb4fwVUammsiZdLX/V69R4TsuG8UoXNgQNDp5PIhWrSHZgWgUZq1ngGvRi1lAg==","sha1":"3057a544492379e40ad2761e503492c2623e148a"},"filename":"chai-as-indexed-7.2.8.tgz"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-as-indexed/MAL-2026-16293.json"}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}