chai-as-init is a malicious npm package that when imported downloads a C2 dropper from https://api.npoint[.]io/c2e881b8bc0fe2121454 and executes it (similar to malware in to chai-await-test).
-= Per source details. Do not edit below this line.=-
Package name impersonates chai-as-promised and ships a README copied from pino as cover. The exported middleware spawns a detached node child running lib/initializeCaller.js, which decodes a base64-encoded URL (https://ipcheck-hashed.vercel.app/api/auth/b4dadd6a26d820d08596) and POSTs the full process.env ({...process.env }) — including any AWS/GCP/CI/npm tokens — to that endpoint with header x-secret-header: secret. The HTTP response body is then passed to new Function('require', response.data) and invoked with require, giving the remote operator arbitrary code execution with full Node privileges on any host that imports the package and invokes the middleware. Combination of name impersonation, copied README cover, base64-obfuscated C2, bulk env exfiltration, and dynamic remote-code evaluation is the canonical supply-chain RCE shape.
{
"malicious-packages-origins": [
{
"source": "amazon-inspector",
"import_time": "2026-04-23T20:49:07.94781775Z",
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "SEMVER"
}
],
"modified_time": "2026-04-23T20:43:56Z",
"sha256": "086ea02015eee2ed739d268574f9f70069e52293a0c16b02b83f76d95c22afae"
},
{
"import_time": "2026-06-11T05:40:59.154425511Z",
"source": "amazon-inspector",
"sha256": "57086955990a082c75fa9bec1a1b3f57a71eafa6eaef825a9c4d716aac044dca",
"id": "IN-MAL-2026-005481",
"versions": [
"1.4.6"
],
"modified_time": "2026-06-11T04:51:43Z"
},
{
"sha256": "4d792d1a35e17dd44d19301afb81ceb82ba68a11913d51ba9462b052e4cb8014",
"source": "amazon-inspector",
"modified_time": "2026-06-12T19:03:14Z",
"id": "IN-MAL-2026-005848",
"versions": [
"1.4.5"
],
"import_time": "2026-06-12T19:43:39.864783269Z"
},
{
"modified_time": "2026-06-12T19:03:15Z",
"source": "amazon-inspector",
"sha256": "86a5e85d8d41d2f731104422d3a8e4a73d02354250782e45389d28acc2332854",
"id": "IN-MAL-2026-005849",
"versions": [
"1.4.7"
],
"import_time": "2026-06-12T19:43:39.957230169Z"
}
],
"iocs": {
"urls": [
"https://api.npoint.io/c2e881b8bc0fe2121454"
]
}
}"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-as-init/MAL-2026-2891.json"
[
{
"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"
}
]
{
"package_integrity": [
{
"filename": "chai-as-init-1.4.6.tgz",
"hashes": {
"sha1": "16d967b2a0ce025654bd685bde338c5d7a3c747e",
"sha512_sri": "sha512-6KhsT/qD7VbLsL5/irAzXgvYnkKhWddv2B4zwZcNvcGcWcQbCxOm3yeiiNj4csd/2dN5gY8PHP220e/lwd4XzA=="
}
}
],
"evidence_files": [
{
"tlsh": "abf0e14e38ba117a02ae68e2bb0b18465003f56237c0d865f2cd836b0f4ed4df6636d8",
"path": "lib/initializeCaller.js",
"sha256": "dd6c890778d25bf1ec3411c142dc921ceb75f2d36790c7e02eb8edc9759d74ce"
},
{
"tlsh": "0b51b7e746e56b6e4b6300f1a5c335a5ff5f931cbf29606dddec91380309897803250a",
"path": "README.md",
"sha256": "69f85aca0109e307b488f37404f53af66d85e38beba792e057335c90c9134462"
}
]
}