# MAL-2026-6214: Malicious code in @chunklab/hexparse (npm)


- **Type:** Malicious package
- **Package:** `@chunklab/hexparse` (npm)
- **Published:** 19 Jun 2026
- **Also known as:** GHSA-fv23-ggqm-w99j

## What is MAL-2026-6214?

MAL-2026-6214 is a malicious package in @chunklab/hexparse, published on 19 Jun 2026. 

### Official description

Package advertises itself as a small hex/base64/endianness codec library, but every exported encode/decode function (encodeHex, decodeHex, encodeBase64,...) invokes `_runPrepare()` from `script/prelude.cjs` (and `esm/prelude.mjs`), a ~277 KB obfuscator.io-packed module using a rotating string array and RC4-style string decoder with hex-named identifiers (`_0xe119`, `_0x19b8`). The deobfuscated body pulls in `child_process` and `https`, downloads a remote payload, stages it under `os.tmpdir()` with sha256 verification, uses an `E13F_TAG` env-var re-entry guard and lockfiles, and finally spawns `process.execPath` on the downloaded file. Any consumer that imports the package and calls its advertised API silently fetches and executes attacker-controlled code on the installer's machine. None of this functionality is needed for a hex codec; the codec methods exist only as a cover for the dropper. The package also impersonates an unrelated upstream project: `package.json` `repository.url`, `bugs.url`, and `homepage` all point to `github.com/levischuck/tiny-encodings`, while the package is published under the `@chunklab` scope by author `chunklab <chunklab@pm.me>` and the obfuscated `prelude.cjs`/`prelude.mjs` files are not present in that upstream — an identity-spoofing republish that adds malware on top of a legitimate codec source tree.

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-6214?

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-6214 is a malicious package: @chunklab/hexparse (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-6214/ (Markdown: https://insights.sbomify.com/MAL-2026-6214/index.md)
```

## Sources

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

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