# MAL-2026-14373: Malicious code in hatdhat-testkit (npm)


- **Type:** Malicious package
- **Package:** `hatdhat-testkit` (npm)
- **Published:** 23 Aug 2026

## What is MAL-2026-14373?

MAL-2026-14373 is a malicious package in hatdhat-testkit, published on 23 Aug 2026. 

### Official description

Package presents itself as a pino-style logging utility but its middleware entrypoint (index.js) spawns lib/caller.js as a detached Node process. caller.js contains a fake `process` object whose `env.DEV_API_KEY`, `env.DEV_SECRET_KEY`, and `env.DEV_SECRET_VALUE` are base64 strings that decode to the URL https://api.jsonstorage.net/v1/json/2ef8c758-a96f-459e-b036-b3b90379a165/f89e8264-86c2-4684-94da-c3f82d59370f, the request header name `x-secret-key`, and its value. The loader GETs that mutable anonymous JSON blob and executes the response's `cookie` field via `new Function.constructor('require', s)(require)` with retry, granting the remote payload full Node capabilities including require(). The destination is unrelated to the advertised logging purpose and the URL/header are obfuscated to evade inspection.

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

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

## Sources

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

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