# MAL-2026-4517: Malicious code in chalk-tempalte (npm)


- **Type:** Malicious package
- **Package:** `chalk-tempalte` (npm)
- **Published:** 20 May 2026
- **Also known as:** GHSA-hvjp-xq9w-c33f

## What is MAL-2026-4517?

MAL-2026-4517 is a malicious package in chalk-tempalte, published on 20 May 2026. 

### Official description

Package name `chalk-tempalte` is a single-character transposition of the popular `chalk-template` package (a top-tier npm utility), consistent with deliberate typosquatting. The tarball ships a `postinstall.js` lifecycle script that imports `child_process`, performs HTTP GET/POST traffic via `http.request(...)`, and collects host identifiers (`hostname:` fields appear repeatedly throughout the script at lines 20, 46, 287, 409, 427). A second large file, `phantom.js`, contains multiple POST sinks (lines 1807, 2113, 3183, 6795, 6852). The structural shape — typosquat name + postinstall script that combines child_process, outbound HTTP, and host/system metadata harvesting — matches the credential/host-data exfiltration pattern used by recent npm supply-chain campaigns. Installing this package causes the postinstall hook to fire automatically on `npm install`, transmitting installer machine data to a remote endpoint and providing a foothold for further code execution.

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

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

## Sources

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

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