HighGHSA-gqgv-6jq5-jjj9CVE-2017-1000048

Prototype Pollution Protection Bypass in qs

Published 30 Apr 2020 · Updated 8 Nov 2023

Affected packages

qsnpm
Affected
<6.0.4
Fixed in
6.0.4
Update to the fixed version for your release line, for example:npm install qs@6.0.4
qsnpm
Affected
>=6.1.0 <6.1.2
Fixed in
6.1.2
Update to the fixed version for your release line, for example:npm install qs@6.1.2
qsnpm
Affected
>=6.2.0 <6.2.3
Fixed in
6.2.3
Update to the fixed version for your release line, for example:npm install qs@6.2.3
qsnpm
Affected
>=6.3.0 <6.3.2
Fixed in
6.3.2
Update to the fixed version for your release line, for example:npm install qs@6.3.2

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.

Recommendation

Upgrade to 6.0.4, 6.1.2, 6.2.3, 6.3.2 or later.

Is GHSA-gqgv-6jq5-jjj9 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected qs, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.