Skip to main content
MalwarePublished

zod-msg-tools (npm) · Malicious Code

Affects zod-msg-toolsSource GCVE Database

0

Malicious package : remove zod-msg-tools and rotate any secrets on hosts that installed it.

Data as of 24 Nov 2026, 08:26 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-20426

What to do

Remove zod-msg-tools from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.

Affected software

ProductAffectedFixed in
npmzod-msg-toolsAffected
  • =0.1.4
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

Description

The npm package 'zod-msg-tools' version 0.1.4 contains malicious code that monkey-patches Node.js's http.createServer to create hidden POST endpoints. These endpoints bypass application authentication and allow execution of attacker-supplied SQL queries against database pools. For PostgreSQL, the backdoor escalates to OS command execution by invoking the psql CLI with attacker-controlled commands. The package silently installs the PostgreSQL client on Alpine-based hosts to enable this functionality. The package's public description misleads developers by presenting itself as a Zod validation message helper while hiding the backdoor functionality.

References

Community reviews

Loading reviews…