# MAL-2026-10044: Malicious code in chai-as-serialized (npm)


- **Type:** Malicious package
- **Package:** `chai-as-serialized` (npm)
- **Published:** 9 Jul 2026
- **Also known as:** GHSA-9q7j-cc9w-c9rf

## What is MAL-2026-10044?

MAL-2026-10044 is a malicious package in chai-as-serialized, published on 9 Jul 2026. 

### Official description

The package's main entry (index.js) spawns a detached `node` child process running lib/initializeCaller.js as a side effect of invoking the exported middleware factory. lib/initializeCaller.js constructs a fake `process.env` object whose fields hold base64 blobs; DEV_API_KEY decodes to https://tomato-brunhilda-40.tiiny.site/index.json and DEV_SECRET_KEY/DEV_SECRET_VALUE decode to an `x-secret-key` request header. The script fetches the JSON body from that anonymous host and executes it via `new Function.constructor("require", response)(require)`, granting the remote host arbitrary code execution with `require` access in the installer/consumer's Node process. The package name mimics `chai-as-promised` and the README is copied from `pino` (pino badges, pino narrative, keywords `fast,logger,stream,json`), while the shipped code has no relation to either — the impersonation is a lure to attract installs to a remote-code-execution dropper. Base64-encoding of the C2 URL and header, disguised as environment-variable configuration, confirms hostile intent.

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

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

## Sources

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

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