CVE-2020-15366:
Prototype Pollution in Ajv
5.6
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.56967%
CWE
Published
2/10/2022
Updated
6/21/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
ajv | npm | < 6.12.3 | 6.12.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from insufficient type validation
in schema processing functions
. The patch adds number validation
checks to these limit-related schema keywords (maximum, maxItems, etc.), which were previously vulnerable to prototype pollution when non-number values were provided. The commit diff shows added validation
logic in these specific template files, and the test cases demonstrate how malicious schemas with string values in numeric fields could pass schema validation
but trigger errors during compilation after the fix. These functions
directly handle schema property validation
and were missing critical type checks that enabled prototype pollution attacks.