CVE-2023-3696: Mongoose Mongoose Prototype Pollution Vulnerability Vulnerability
CRITICALCVE-2023-3696 is a CRITICAL (CVSS 10.0) mongoose prototype pollution vulnerability vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Mongoose libraries in the npm ecosystem. The issue involves mongoose prototype pollution vulnerability. Remediation is available by upgrading affected packages to version 7.3.3, 6.11.3, 5.13.20.
CVE-2023-3696 at a Glance
Security Impact
CVSS: 10.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:H).
How to Fix CVE-2023-3696
To remediate this vulnerability, upgrade all affected Mongoose dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install mongoose@7.3.3
npm install mongoose@6.11.3
npm install mongoose@5.13.20
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls mongoose
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-3696, inspect your project dependencies using npm:
npm ls mongoose
Analyze the terminal output to locate any version of Mongoose in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.3.3), your application is affected.
Note: The npm ls mongoose command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Mongoose, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-3696 Affected Mongoose Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mongoose
|
npm |
≥ 7.0.0
< 7.3.3
|
7.3.3
|
|
mongoose
|
npm |
≥ 6.0.0
< 6.11.3
|
6.11.3
|
|
mongoose
|
npm |
< 5.13.20
|
5.13.20
|
References
Frequently Asked Questions
What is CVE-2023-3696?
Which Mongoose versions are affected?
What version fixes CVE-2023-3696?
Is mongoose affected?
What is the CVSS score of CVE-2023-3696?
What CWE is associated with CVE-2023-3696?
How can I check npm dependencies for CVE-2023-3696?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9m93-w8w6-76hh",
"modified" : "2023-07-18T16:57:08Z",
"published" : "2023-07-17T03:30:20Z",
"aliases" : [ "CVE-2023-3696" ],
"summary" : "Mongoose Prototype Pollution vulnerability",
"details" : "Prototype Pollution in GitHub repository automattic/mongoose prior to 7.3.3, 6.11.3, and 5.13.20.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "mongoose"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.3.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "mongoose"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.11.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "mongoose"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.13.20"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-3696"
}, {
"type" : "WEB",
"url" : "https://github.com/Automattic/mongoose/commit/e29578d2ec18a68aeb4717d66dd5eb66bae53de1"
}, {
"type" : "WEB",
"url" : "https://github.com/Automattic/mongoose/commit/f1efabf350522257364aa5c2cb36e441cf08f1a2"
}, {
"type" : "WEB",
"url" : "https://github.com/automattic/mongoose/commit/305ce4ff789261df7e3f6e72363d0703e025f80d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Automattic/mongoose"
}, {
"type" : "WEB",
"url" : "https://github.com/Automattic/mongoose/releases/tag/7.3.3"
}, {
"type" : "WEB",
"url" : "https://huntr.dev/bounties/1eef5a72-f6ab-4f61-b31d-fc66f5b4b467"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-18T16:57:08Z",
"nvd_published_at" : "2023-07-17T01:15:08Z"
}
}