{"id":"MAL-2026-20426","aliases":[],"title":"Malicious code in zod-msg-tools (npm)","originalDescription":" --- _-= Per source details. Do not edit below this line.=-_ ## 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/<service>/zod-tools. Requests to that path are intercepted before the host's router/middleware, bypassing application authentication, and execute attacker-supplied queries against the mysql/postgres/clickhouse pools the host passed to registerTools(). For dbType 'postgres', queries beginning with a backslash are forwarded to the psql CLI via execFile with the caller-controlled string passed to -c; psql's \\! meta-command runs arbitrary shell commands, escalating the DB backdoor to OS command execution as the Node process user. To enable that path, registerTools() also runs `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","severity":{"cvss":null,"vector":null,"label":null},"exploitation":{"kev":null,"epss":null,"exploitDb":null},"affected":[],"references":[{"url":"https://www.npmjs.com/package/zod-msg-tools/v/0.1.4","type":"package"}],"sources":[{"name":"osv","at":"2026-11-24T06:54:22.840Z","url":"https://osv.dev/vulnerability/MAL-2026-20426","license":"CC-BY 4.0","firstSeenAt":"2026-11-24T06:54:22.840Z"}],"firstSeenAt":"2026-11-24T06:54:22.840Z","publishedAt":"2026-11-24T06:04:20.000Z","modifiedAt":"2026-11-24T06:30:07.083Z"}