{"id":"MAL-2026-10041","revision":"4136e61f4c294a278ff39a0b3c906931","records":[{"revision":"4136e61f4c294a278ff39a0b3c906931","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-10041","aliases":["GHSA-jvvq-ph8p-7cc9"],"title":"Malicious code in chai-as-buffered (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (3d136202d96267459c4bf3aaaf6c903d7bd2c491901b61dcf2f391a4612f951a)\nchai-as-buffered@3.7.24 is a typosquat lure (name resembles chai-as-promised; README and module exports impersonate the pino logger) whose actual behavior is a remote-payload dropper. lib/caller.js shadows `process` with a local object whose `env` holds base64-encoded constants for the C2 URL, header name, and header value, hiding the destination from review and from env scanning. When the exported middleware is invoked (e.g., via `chai.use(...)` or `require('chai-as-buffered')` wiring through the pino-styled export), the package base64-decodes the hidden URL (https://api.jsonstorage.net/v1/json/2ef8c758-a96f-459e-b036-b3b90379a165/a179ea35-b962-4722-b3f1-e28316d1a44a), spawns a detached, stdio-ignored `node./lib/caller.js` child, fetches a JSON document from that mutable third-party blob, and passes the document's `cookie` field to `Function.constructor('require', s)` invoked with the live `require`. The fetched JavaScript executes with full `require` access on the installer's machine. The destination is an attacker-controlled mutable JSON store whose content can be changed at any time, giving the publisher arbitrary code execution against any environment that loads this package.\n","state":0,"publishedAt":"2026-07-09T15:34:29+00:00","modifiedAt":"2026-09-18T02:30:06.870716+00:00","affected":[{"ecosystem":"npm","name":"chai-as-buffered","ranges":[],"versions":["3.7.24","7.2.5"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/chai-as-buffered/v/3.7.24","https://github.com/advisories/GHSA-jvvq-ph8p-7cc9","https://www.npmjs.com/package/chai-as-buffered/v/7.2.5"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-10041","license":"OSV · upstream source license applies","key":"osv:MAL-2026-10041","identifiers":["MAL-2026-10041","GHSA-jvvq-ph8p-7cc9"]},"retained":false,"historicalAffected":[]}],"coverage":[]}