{"id":"MAL-2026-10175","revision":"f5f7f89983c846adb7f60e9728855e95","records":[{"revision":"f5f7f89983c846adb7f60e9728855e95","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-10175","aliases":[],"title":"Malicious code in chai-as-doc (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (cecfd3091225b3667317dd9da8fd56c4f5e7fc675e17d52cda601898b3a50ec2)\nThe package presents itself as pino-style logging middleware but on require() spawns a detached Node child that runs lib/initializeCaller.js. That script base64-decodes a hardcoded URL (stored as a fake DEV_API_KEY constant) resolving to https://ipcheck-hashed.vercel.app/api/auth/6c1d60d35852ef0c05df, POSTs the entire process.env object to it with an x-secret-header, and then passes the HTTP response body to `new Function(\"require\", response.data)` and invokes it with the local require. This gives the remote host arbitrary code execution inside the installer's Node process with full environment/credential access. The base64 obfuscation of the endpoint, the disguised middleware cover story, and the name resembling chai/chai-as-promised are consistent with a typosquat supply-chain attack.\n","state":0,"publishedAt":"2026-07-10T21:24:50+00:00","modifiedAt":"2026-07-10T21:31:48.9614482+00:00","affected":[{"ecosystem":"npm","name":"chai-as-doc","ranges":[],"versions":["2.3.5"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/chai-as-doc/v/2.3.5"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-10175","license":"OSV · upstream source license applies","key":"osv:MAL-2026-10175","identifiers":["MAL-2026-10175"]},"retained":false,"historicalAffected":[]}],"coverage":[]}