Vulnerabilities in pkg:npm/body-parser-xml
PACKAGECVE-2021-3666 is a HIGH (CVSS 7.6) body-parser-xml vulnerable to prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Body parser xml libraries in the npm ecosystem. The issue involves body-parser-xml vulnerable to prototype pollution. Remediation is available by upgrading affected packages to version 2.0.3.
pkg:npm/body-parser-xml
Vulnerability advisories affecting package pkg:npm/body-parser-xml. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-2ghc-6v89-pw9j | CVE-2021-3666 | HIGH | body-parser-xml vulnerable to Prototype Pollution |
CVE-2021-3666 at a Glance
Security Impact
CVSS: 7.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H).
How to Fix CVE-2021-3666
To remediate this vulnerability, upgrade all affected Body parser xml 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 body-parser-xml@2.0.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls body-parser-xml
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-3666, inspect your project dependencies using npm:
npm ls body-parser-xml
Analyze the terminal output to locate any version of Body parser xml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.3), your application is affected.
Note: The npm ls body-parser-xml 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 Body parser xml, 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-2021-3666 Affected Body parser xml Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
body-parser-xml
|
npm |
< 2.0.3
|
2.0.3
|
References
Frequently Asked Questions
What is CVE-2021-3666?
Which Body parser xml versions are affected?
What version fixes CVE-2021-3666?
Is body-parser-xml affected?
What is the CVSS score of CVE-2021-3666?
What CWE is associated with CVE-2021-3666?
How can I check npm dependencies for CVE-2021-3666?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2ghc-6v89-pw9j",
"modified" : "2022-08-10T23:37:49Z",
"published" : "2021-09-14T20:25:35Z",
"aliases" : [ "CVE-2021-3666" ],
"summary" : "body-parser-xml vulnerable to Prototype Pollution",
"details" : "body-parser-xml is vulnerable to Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "body-parser-xml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-3666"
}, {
"type" : "WEB",
"url" : "https://github.com/fiznool/body-parser-xml/commit/d46ca622560f7c9a033cd9321c61e92558150d63"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/fiznool/body-parser-xml"
}, {
"type" : "WEB",
"url" : "https://huntr.dev/bounties/1-other-fiznool/body-parser-xml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321", "CWE-915" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-09-14T18:39:31Z",
"nvd_published_at" : "2021-09-13T18:15:00Z"
}
}