{"id":"MAL-2026-6907","summary":"Malicious code in chai-spycore (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (fbb99516f251bbd13baae5273239a6a04acefea76ddf1a7b06f4b5a328339dae)\nPackage republishes the `chai-spies` Chai plugin source verbatim (including original author header) under the near-identical name `chai-spycore`. `package.json` declares six runtime dependencies — `fast-deep-equal`, `eventemitter3`, `lodash.clonedeep`, `chai-guard`, `is-plain-object`, `just-extend` — but none of these are `require()`d anywhere in `lib/spy.js` or `index.js`. The legitimate `chai-spies` ships with zero runtime dependencies, so the additional deps are pulled into the installer's tree on `npm install chai-spycore` without serving any function in the package's own code. The non-mainstream `chai-guard` dependency is the most suspicious of the set and is the likely vehicle for any indirect code execution against the installer. Routing to human review to assess the name-confusion claim against `chai-spies` and to inspect `chai-guard`'s contents.\n\n## Source: ghsa-malware (fc0a99e30b6e4bd6566b0a720a8b30f21a776ec86f3aa1f02c618fb91de0256a)\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-w3fq-7xj5-8gmv"],"modified":"2026-07-08T19:46:50.205220848Z","published":"2026-07-07T06:27:27Z","database_specific":{"malicious-packages-origins":[{"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"source":"ghsa-malware","sha256":"fc0a99e30b6e4bd6566b0a720a8b30f21a776ec86f3aa1f02c618fb91de0256a","import_time":"2026-07-07T07:26:00.87903834Z","id":"GHSA-w3fq-7xj5-8gmv","modified_time":"2026-07-07T06:27:32Z"},{"versions":["1.1.0"],"source":"amazon-inspector","sha256":"981e06e5fef0e9f429323cd55dc586e746a02cec74214d7ac29c9688a51170fd","import_time":"2026-07-08T19:33:42.354418108Z","id":"IN-MAL-2026-008184","modified_time":"2026-07-08T19:20:46Z"},{"source":"amazon-inspector","sha256":"fbb99516f251bbd13baae5273239a6a04acefea76ddf1a7b06f4b5a328339dae","import_time":"2026-07-08T19:33:42.515558424Z","id":"IN-MAL-2026-008186","modified_time":"2026-07-08T19:21:03Z","versions":["1.5.3"]}]},"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-w3fq-7xj5-8gmv"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-spycore/v/1.1.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/chai-spycore/v/1.5.3"}],"affected":[{"package":{"name":"chai-spycore","ecosystem":"npm","purl":"pkg:npm/chai-spycore"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.1.0","1.5.3"],"database_specific":{"cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}],"indicators":{"evidence_files":[{"tlsh":"6f1166a8db348d6316ca61a4906f11827135ce5b8e98bd1e37e7414c9f1e92b30fddac","path":"package.json","sha256":"ee6c29c2a52e8ef1bc465d06236b544755eda732c4019f7f8881240510f94e36"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/chai-spycore/MAL-2026-6907.json"}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}