{"id":"MAL-2026-10039","revision":"6795737fd3e94b2ebd89a85c65751b71","records":[{"revision":"6795737fd3e94b2ebd89a85c65751b71","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"MAL-2026-10039","aliases":["GHSA-8vcr-xf6w-wg45"],"title":"Malicious code in chai-as-align (npm)","description":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (791f5dcd4f623d5301bc3abf922c5f0e4ff716017fe67d3673c778e9d31b0776)\nThe package presents itself as a testing/logging helper but its exported middleware factory spawns a detached background Node child that runs lib/initializeCaller.js. That script base64-decodes a hidden URL (https://amethyst-lorrin-26.tiiny.site/index.json) from a fake process.env stub, fetches its 'cookie' field over HTTPS with an 'x-secret-key' header, and executes the returned body via `new Function.constructor('require', response)` bound to the real `require`, in a retry loop. This yields full remote code execution on the installer's machine whenever the exported middleware is invoked. The destination is an anonymous file-hosting service (tiiny.site) whose contents are attacker-mutable. The package name closely resembles the popular chai-as-promised library, and its declared description/keywords do not match the shipped code, indicating typosquat delivery of the dropper. The detached+unref'd child with stdio ignored is used to hide the payload's activity from the consuming application.\n","state":0,"publishedAt":"2026-07-09T15:33:32+00:00","modifiedAt":"2026-09-01T11:30:50.0767302+00:00","affected":[{"ecosystem":"npm","name":"chai-as-align","ranges":[],"versions":["7.1.0"],"rawVersionEvidence":null}],"metrics":[],"references":["https://www.npmjs.com/package/chai-as-align/v/7.1.0","https://github.com/advisories/GHSA-8vcr-xf6w-wg45"],"sourceUrl":"https://osv.dev/vulnerability/MAL-2026-10039","license":"OSV · upstream source license applies","key":"osv:MAL-2026-10039","identifiers":["MAL-2026-10039","GHSA-8vcr-xf6w-wg45"]},"retained":false,"historicalAffected":[]}],"coverage":[]}