CVE-2017-1000048: Qs Prototype Pollution Protection Bypass Vulnerability
HIGHCVE-2017-1000048 is a HIGH (CVSS 7.5) prototype pollution protection bypass vulnerability (CWE-20: Improper Input Validation) affecting Qs libraries in the npm ecosystem. The issue involves prototype pollution protection bypass in qs. Remediation is available by upgrading affected packages to version 6.0.4, 6.1.2, 6.2.3, 6.3.2.
CVE-2017-1000048 at a Glance
Security Impact
CVSS: 7.5
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:U/C:N/I:N/A:H).
How to Fix CVE-2017-1000048
To remediate this vulnerability, upgrade all affected Qs 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 qs@6.0.4
npm install qs@6.1.2
npm install qs@6.2.3
npm install qs@6.3.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls qs
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2017-1000048, inspect your project dependencies using npm:
npm ls qs
Analyze the terminal output to locate any version of Qs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.0.4), your application is affected.
Note: The npm ls qs 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Qs, 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-2017-1000048 Affected Qs Versions
4 component(s)References
Frequently Asked Questions
What is CVE-2017-1000048?
Which Qs versions are affected?
What version fixes CVE-2017-1000048?
Is qs affected?
What is the CVSS score of CVE-2017-1000048?
What CWE is associated with CVE-2017-1000048?
How can I check npm dependencies for CVE-2017-1000048?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gqgv-6jq5-jjj9",
"modified" : "2021-08-25T21:03:56Z",
"published" : "2020-04-30T17:16:47Z",
"aliases" : [ "CVE-2017-1000048" ],
"summary" : "Prototype Pollution Protection Bypass in qs",
"details" : "Affected version of `qs` are vulnerable to Prototype Pollution because it is possible to bypass the protection. The `qs.parse` function fails to properly prevent an object's prototype to be altered when parsing arbitrary input. Input containing `[` or `]` may bypass the prototype pollution protection and alter the Object prototype. This allows attackers to override properties that will exist in all objects, which may lead to Denial of Service or Remote Code Execution in specific circumstances.\n\n\n## Recommendation\n\nUpgrade to 6.0.4, 6.1.2, 6.2.3, 6.3.2 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "qs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.0.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "qs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.1.0"
}, {
"fixed" : "6.1.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "qs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.2.0"
}, {
"fixed" : "6.2.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "qs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.3.0"
}, {
"fixed" : "6.3.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-1000048"
}, {
"type" : "WEB",
"url" : "https://github.com/ljharb/qs/issues/200"
}, {
"type" : "WEB",
"url" : "https://github.com/ljharb/qs/commit/beade029171b8cef9cee0d03ebe577e2dd84976d"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2017:2672"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ljharb/qs"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/npm:qs:20170213"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1469"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-04-30T17:16:10Z",
"nvd_published_at" : null
}
}