Intel

AIKIDO-2026-273849

ajv is vulnerable to Prototype Pollution

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Jul 8, 2026
July 8, 2026

25

CVE Score

Low

Prototype Pollution

Are you affected? Scan for Free

TL;DR

Ajv stores its registered formats in a plain JavaScript object, so a lookup by format name inherits properties from Object.prototype. When the $data option is enabled and a schema resolves the format keyword from a $data reference, an attacker-controlled value such as constructor, toString, or hasOwnProperty resolves to an inherited prototype function instead of undefined. Ajv then treats that inherited function as a format validator and invokes it, causing unexpected validation behavior or errors during validation. The fix stores the internal formats map as a null-prototype object (Object.create(null)) so prototype property names resolve to unknown formats.

How do I fix this?

Upgrade the ajv 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 enable $data support (the $data option, or the experimental v5 option in older 3.x/4.x releases) and validate schemas that resolve the format keyword from $data-referenced, attacker-controllable data.

Package

Versions

3.0.0 - 6.14.0

Fixed in 6.15.0

7.0.0 - 8.18.0

Fixed in 8.20.0

Background info

ajv is vulnerable to Prototype Pollution in versions 3.0.0 - 6.14.0 and 7.0.0 - 8.18.0.

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