CVE-2020-15366 Prototype Pollution in Ajv
Attackers can execute arbitrary code via prototype pollution in Ajv by providing a crafted JSON schema, affecting applications using this library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2020-15366?
CVE-2020-15366 is a medium-severity code injection vulnerability in n/a, published on 15 Jul 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
An issue was discovered in ajv.validate() in Ajv (aka Another JSON Schema Validator) 6.12.2. A carefully crafted JSON schema could be provided that allows execution of other code by prototype pollution. (While untrusted schemas are recommended against, the worst case of an untrusted schema should be a denial of service, not execution of code.)
Weakness: CWE-1321
Which versions are affected by CVE-2020-15366?
2 open source packages ship an affected version, including ajv. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
ajv npm | All versions | 6.12.3 |
ajv npm | All versions | 6.12.3 |
Products include Ajv.js Ajv.
How do I fix CVE-2020-15366?
Upgrade ajv to 6.12.3 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2020-15366 being exploited?
There is no known exploitation of CVE-2020-15366 in the wild and no public exploit code.
Sources
Also known as CLSA-2026-1784596282, CLSA-2026-1784683069, CLSA-2026-1789034358, CLSA-2026-1792163462, DEBIAN-CVE-2020-15366, GHSA-v88g-cgmw-v5xw and 2 more.