CVE-2022-24999: Prototype Pollution in qs

qs Updated 02 Oct 2025

Summary

27/11/2022
Yes i
High
7.5

CVE-2022-24999: qs vulnerable to Prototype Pollution. Affects qs across 9 version ranges.

< 6.2.4 >= 6.3.0, < 6.3.3 >= 6.4.0, < 6.4.1 >= 6.5.0, < 6.5.3 >= 6.6.0, < 6.6.1 >= 6.7.0, < 6.7.3 >= 6.8.0, < 6.8.3 >= 6.9.0, < 6.9.7 >= 6.10.0, < 6.10.3

Fixed in 9 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-24999 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

qs is an npm package used for parsing and stringifying URL query strings. It is commonly used in web frameworks to handle query parameters. The package is vulnerable to Prototype Pollution, which allows attackers to modify the prototype of objects and potentially execute arbitrary code.

Vulnerability Detail

The vulnerability in qs arises from the ability to include an __proto__ key in the query string of a URL. By crafting a malicious query string, an unauthenticated remote attacker can manipulate the prototype of objects in the application's code, leading to various security issues. This can result in a Node process hang or potentially allow the execution of arbitrary code.

How To Fix

Latest published version: 6.16.1 as of 22 Oct 2026

npm install qs@6.16.1

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 6.2.4 6.2.4
    npm install qs@6.2.4
  • >= 6.3.0, < 6.3.3 6.3.3
    npm install qs@6.3.3
  • >= 6.4.0, < 6.4.1 6.4.1
    npm install qs@6.4.1
  • >= 6.5.0, < 6.5.3 6.5.3
    npm install qs@6.5.3
  • >= 6.6.0, < 6.6.1 6.6.1
    npm install qs@6.6.1
  • >= 6.7.0, < 6.7.3 6.7.3
    npm install qs@6.7.3
Show all 9 release lines
  • >= 6.8.0, < 6.8.3 6.8.3
    npm install qs@6.8.3
  • >= 6.9.0, < 6.9.7 6.9.7
    npm install qs@6.9.7
  • >= 6.10.0, < 6.10.3 6.10.3
    npm install qs@6.10.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If updating the package is not immediately feasible, a temporary workaround is to sanitize and validate the query string inputs to prevent the inclusion of the __proto__ key. This can be done by explicitly removing or rejecting any query parameters that contain this key.

Conclusion

The vulnerability in qs package allows attackers to exploit Prototype Pollution, potentially leading to a Node process hang or the execution of arbitrary code. It is crucial to update the package to the fixed versions or apply the provided workaround to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for qs →

Share this vulnerability

FAQ

Prototype Pollution is a vulnerability that allows attackers to modify the prototype of objects in JavaScript, leading to unexpected behavior and potential security issues.

An attacker can exploit this vulnerability by crafting a malicious query string with an __proto__ key, which can modify the prototype of objects in the application's code.

The potential consequences of this vulnerability include a Node process hang or the execution of arbitrary code, depending on how the attacker manipulates the prototype of objects.

Yes, the vulnerability can be fixed by updating the qs package to version 6.10.3 or later. Backported fixes are also available for earlier versions.

A temporary workaround is to sanitize and validate the query string inputs to prevent the inclusion of the __proto__ key.

Related vulnerabilities

Recent vulnerabilities recorded for qs.

How To Fix

Latest published version: 6.16.1 as of 22 Oct 2026

npm install qs@6.16.1

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 6.2.4 6.2.4
    npm install qs@6.2.4
  • >= 6.3.0, < 6.3.3 6.3.3
    npm install qs@6.3.3
  • >= 6.4.0, < 6.4.1 6.4.1
    npm install qs@6.4.1
  • >= 6.5.0, < 6.5.3 6.5.3
    npm install qs@6.5.3
  • >= 6.6.0, < 6.6.1 6.6.1
    npm install qs@6.6.1
  • >= 6.7.0, < 6.7.3 6.7.3
    npm install qs@6.7.3
Show all 9 release lines
  • >= 6.8.0, < 6.8.3 6.8.3
    npm install qs@6.8.3
  • >= 6.9.0, < 6.9.7 6.9.7
    npm install qs@6.9.7
  • >= 6.10.0, < 6.10.3 6.10.3
    npm install qs@6.10.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback