Intel

AIKIDO-2026-500926

zod is vulnerable to Prototype Pollution

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Sep 2, 2026
September 2, 2026

38

CVSS Score

Low

Prototype Pollution

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.

How do I fix this?

Upgrade the zod library to the patch version.

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.

Package

Versions

4.0.0 - 4.4.3

Fixed in 4.5.0

Background info

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

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea