Intel

AIKIDO-2026-500926

zod is vulnerable to Prototype Pollution

Prototype Pollution Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Yesterday

38

Low Risk

This Affects:

JSzod
4.0.0 - 4.4.3
Fixed in 4.5.0
Are you affected? Scan for Free

TL;DR

Object and record parsers did not consistently strip a __proto__ key. The key could still be copied from untrusted input, declared on the schema, or produced when a record key schema or transform normalized a value to __proto__, which can replace the parsed object's prototype via ordinary property assignment. .strict() also swallowed an own __proto__ input key instead of reporting unrecognized_keys. Error formatters and both JSON Schema converters wrote nested path segments such as toString or constructor without own-property semantics, so those segments could walk onto Object.prototype. Parsers now drop __proto__ in all of those cases, .strict() reports the key, and formatters and converters use own-property writes.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you parse untrusted objects or records, use .strict(), format Zod errors, or convert schemas to JSON Schema.

Background info

zod is vulnerable to Prototype Pollution in versions 4.0.0 - 4.4.3.

How to fix this

Upgrade the zod library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform