# MAL-2026-5908: Malicious code in chain-chai-test (npm)


- **Type:** Malicious package
- **Package:** `chain-chai-test` (npm)
- **Published:** 16 Jun 2026
- **Also known as:** GHSA-6626-c428-r9qf

## What is MAL-2026-5908?

MAL-2026-5908 is a malicious package in chain-chai-test, published on 16 Jun 2026. 

### Official description

chain-chai-test@1.3.5 advertises itself as a pino-style logger (keywords fast/logger/stream/json, exported alias module.exports.pino = middleware, pino-pretty visual assets) but the exported middleware factory spawns a detached `node lib/caller.js` process. caller.js performs `axios.get` against https://jsonkeeper.com/b/EXSIF (with a base64-obfuscated sibling URL https://jsonkeeper.com/b/ZK45J in lib/const.js, decoded from `aHR0cHM6Ly9qc29ua2VlcGVyLmNvbS9iL1pLNDVK`), reads `.data.cookie` from the response, and passes that string to `new Function.constructor("require", s)` invoked with the host process's `require`. That executes attacker-controlled JavaScript with full Node.js privileges in the consuming application. The fetch destination is an anonymous, mutable JSON-paste host, the URL is duplicated in obfuscated form to conceal the C2 endpoint, and the package name and exported API impersonate the legitimate pino logger to lure installers. Unrelated dependencies (request, sqlite3, parse-json) further indicate this is not a logger implementation.

Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

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

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

## Sources

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

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