{"id":"MAL-2026-10045","revision":"422bce2313214878b863c961706082a1","records":[{"revision":"422bce2313214878b863c961706082a1","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-10045","aliases":["GHSA-wm45-4mwq-2pg6"],"title":"Malicious code in chai-as-sharpened (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (854e8e5d81ba59ee1353535523ea62b29c07de8d6a5cc50745a471696d80576a)\nOn require, the package spawns a detached background `node` process running `lib/initializeCaller.js`. That script base64-decodes a hardcoded URL (https://tomato-brunhilda-40.tiiny.site/index.json), fetches JSON from it, and executes the returned `cookie` field through `new Function.constructor('require', response)(require)` — giving the remote payload full `require` access on the installer's host. The endpoint URL and request header key/value are hidden inside base64 strings assigned to a locally-shadowed `process.env` object and decoded via `atob()` at runtime, obfuscating the C2 destination. The package additionally impersonates two well-known libraries: the name `chai-as-sharpened` mimics `chai-as-promised`, and the README badges/links point to `pino` and `pinojs/pino`, using name confusion as the delivery vector. Import triggers unconditional RCE against any consumer.\n","state":0,"publishedAt":"2026-07-09T15:31:55+00:00","modifiedAt":"2026-09-01T11:31:28.5011061+00:00","affected":[{"ecosystem":"npm","name":"chai-as-sharpened","ranges":[],"versions":["7.0.9"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/chai-as-sharpened/v/7.0.9","https://github.com/advisories/GHSA-wm45-4mwq-2pg6"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-10045","license":"OSV · upstream source license applies","key":"osv:MAL-2026-10045","identifiers":["MAL-2026-10045","GHSA-wm45-4mwq-2pg6"]},"retained":false,"historicalAffected":[]}],"coverage":[]}