Malicious code in zod-msg-tools (npm)
MAL-2026-20426
Published · Modified
Dependency scanning
Check whether zod-msg-tools is in your codebase
Corgea flags malicious and compromised dependencies with reachability analysis, so you fix the packages that actually run in your application instead of working through the whole lockfile.
Description
__
Source: amazon-inspector (32803547c3e48129e87b2661d4dcd865886bb13604c69738fd26798861b72931)
Package is published on npm as a helper for Zod validation messages, but its actual code monkey-patches Node's http.createServer so that any HTTP server the host process subsequently creates transparently serves a hidden POST endpoint at paths like /api/aff-service/zod-tools and /api/backoffice/apk add --no-cache postgresql-client via execSync at library-init time, silently modifying Alpine-based hosts. The npm README describes a Zod message helper, while the package.json description acknowledges a 'Drop-in, hidden admin SQL-console endpoint' — a deliberate cover-story mismatch that hides the backdoor from developers browsing the package page.
References
Ready to move
Start Securing
Free, no credit card | First findings in minutes