{"answers":{"affected":"1 open source package ship an affected version, including chai-as-staged.","exploited":"There is no known exploitation of MAL-2026-10047 in the wild and no public exploit code.","fix":"Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.","what":"MAL-2026-10047 is a malicious package in chai-as-staged, published on 9 Jul 2026."},"fix_prompt":"MAL-2026-10047 is a malicious package: chai-as-staged (npm). Every version was published to cause harm.\n\nTask:\n1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.\n2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.\n3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.\n4. If the package is not used anywhere, say so and change nothing.\n\nReference: https://insights.sbomify.com/MAL-2026-10047/ (Markdown: https://insights.sbomify.com/MAL-2026-10047/index.md)","id":"MAL-2026-10047","markdown":"https://insights.sbomify.com/MAL-2026-10047/index.md","name":"MAL-2026-10047","record":{"aliases":["GHSA-fchw-g3j3-hxh3"],"analysis":null,"analysis_generated_by":null,"assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"Package name impersonates the popular `chai-as-promised` testing library and the README is copied from `pino`. The advertised usage `chai.use(chaiAsStaged)` triggers a detached `node` child process that runs `lib/initializeCaller.js`. That file hides its C2 endpoint and a custom HTTP header name/value as base64 strings stored under decoy names (`DEV_API_KEY`, `DEV_SECRET_KEY`, `DEV_SECRET_VALUE`) inside a fake local `process` object; at runtime it base64-decodes the URL to `https://amethyst-lorrin-26.tiiny.site/index.json`, fetches it with the obfuscated header, extracts the `.cookie` field from the JSON response, and executes the returned JavaScript via `new Function.constructor('require', response)(require)` in a retry loop. Attacker-controlled code is therefore executed on the installer's machine with full `require` access whenever the library is used as documented. The combination of name/README impersonation, base64-obfuscated C2 on an anonymous static-hosting host, and dynamic code construction with `require` removes any benign interpretation.","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":false,"headline":"Malicious code in chai-as-staged (npm)","id":"MAL-2026-10047","indexable":true,"kev":null,"kind":"malicious","links":{"ecosystem":"npm","product":null,"products":[],"type":null,"year":"2026"},"n_packages":1,"n_references":null,"packages":[{"ecosystem":"npm","fixed":[],"introduced":[],"last_affected":[],"package":"chai-as-staged","purl":"pkg:npm/chai-as-staged","source":"MAL-2026-10047"}],"products":null,"published":"2026-07-09","related":[],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"OpenSSF Malicious Packages","prefix":"MAL"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":null,"url":"https://insights.sbomify.com/MAL-2026-10047/"}