MAL-2026-10045 Malicious code in chai-as-sharpened (npm)
Malicious package
Published
MAL-2026-10045 is a malicious package: chai-as-sharpened (npm). Every version was published to cause harm.
Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.
Reference: https://insights.sbomify.com/MAL-2026-10045/ (Markdown: https://insights.sbomify.com/MAL-2026-10045/index.md)
- Package
- chai-as-sharpened
- Registry
- npm
What is MAL-2026-10045?
MAL-2026-10045 is a malicious package in chai-as-sharpened, published on 9 Jul 2026.
Official description
On 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.What should I do about MAL-2026-10045?
Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.
Sources
Also known as GHSA-wm45-4mwq-2pg6.