# MAL-2026-10052: Malicious code in chai-promised-test (npm)


- **Type:** Malicious package
- **Package:** `chai-promised-test` (npm)
- **Published:** 9 Jul 2026

## What is MAL-2026-10052?

MAL-2026-10052 is a malicious package in chai-promised-test, published on 9 Jul 2026. 

### Official description

Package masquerades as a chai-as-promised plugin / pino logger (README and exports copied from pino, including `module.exports.pino = middleware`) but on use spawns a detached Node process running lib/caller.js, which fetches a string from https://jsonkeeper.com/b/EXSIF and executes it via `new Function.constructor("require", s)(require)`. The fetched code runs with full Node privileges (require, fs, child_process, network). The C2 URL and request headers are concealed by shadowing the local `process` object with fields named `DEV_API_KEY` / `DEV_SECRET_KEY` / `DEV_SECRET_VALUE`, and lib/const.js carries base64-encoded equivalents that decode to a second jsonkeeper.com paste and the header name `x-secret-key`. The remote paste is mutable and attacker-controlled, allowing arbitrary code execution on the installer's machine. Identity confusion with chai-as-promised / pino indicates the package exists to be installed by mistake.

## What should I do about MAL-2026-10052?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

## Fix prompt for AI coding agents

```text
MAL-2026-10052 is a malicious package: chai-promised-test (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-10052/ (Markdown: https://insights.sbomify.com/MAL-2026-10052/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/MAL-2026-10052

---
From sbomify Insights: https://insights.sbomify.com/MAL-2026-10052/
Summaries are generated and may contain mistakes; the official description above is the record.
