# MAL-2026-4515: Malicious code in chai-val (npm)


- **Type:** Malicious package
- **Package:** `chai-val` (npm)
- **Published:** 21 May 2026

## What is MAL-2026-4515?

MAL-2026-4515 is a malicious package in chai-val, published on 21 May 2026. 

### Official description

The package masquerades as a pino-logger helper (file structure, exports, and keywords are copied from pino) but its main entry exports a middleware that spawns `node lib/caller.js` as a detached child process. caller.js performs an HTTP GET to https://jsonkeeper.com/b/XRGF3 and passes the response's `.cookie` field directly into `new Function.constructor('require', s)`, invoking it with the host's `require` — granting the fetched script full Node.js capabilities (filesystem, network, child_process, env). The destination URL is additionally stored base64-encoded as `DEV_API_KEY: "aHR0cHM6Ly9qc29ua2VlcGVyLmNvbS9iL1hSR0Yz"`, an obfuscation of the same C2 endpoint. jsonkeeper.com is an anonymous, mutable paste host: today's content can be replaced by the operator at any moment without republishing the npm package. Any developer who installs chai-val and invokes the advertised middleware export triggers arbitrary remote code execution under their Node process.

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

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

## Sources

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

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