Intel

AIKIDO-2026-273849

ajv is vulnerable to Prototype Pollution

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

25

Low Risk

This Affects:

JSajv
3.0.0 - 6.14.0
Fixed in 6.15.0
7.0.0 - 8.18.0
Fixed in 8.20.0
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.

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.

Background info

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

How to fix this

Upgrade the ajv 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