CVE-2022-2564: automattic/mongoose vulnerable to Prototype pollution via Schema.path
7
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.81711%
CWE
Published
7/29/2022
Updated
11/29/2023
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:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| mongoose | npm | >= 6.0.0, < 6.4.6 | 6.4.6 |
| mongoose | npm | < 5.13.15 | 5.13.15 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from insufficient input validation in schema path handling. The GitHub commit a45cfb6 explicitly adds checks for special properties (like proto) in both add() and path() methods, confirming these were the entry points. The CVE description directly implicates Schema.path() as the vulnerable function, and the patch modifies both functions to prevent prototype pollution by rejecting special property keys. The high confidence comes from the direct correlation between the vulnerability description, CWE-1321 (Prototype Pollution), and the specific defensive code changes in these functions.