CVE-2026-82562: qs Package Array Limit Bypass Vulnerability
Summary
CVE-2026-82562: qs array-limit bypass via bracket-key comma parsing. Affects qs versions >= 6.14.2, < 6.16.0. Fixed in 6.16.0. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The 'qs' package is a widely used query string parsing library in Node.js applications. It allows developers to easily convert query strings into JavaScript objects and vice versa. The package supports various features, including nested objects and arrays, making it a flexible choice for handling complex query strings. However, a vulnerability in version 6.15.3 allows attackers to bypass array limits, potentially leading to denial of service through excessive memory allocation.
Vulnerability Detail
The vulnerability in the 'qs' package arises from its handling of bracket-key input when the 'comma' option is enabled. Specifically, the 'parseArrayValue()' function does not enforce the array limit for non-flat values, allowing an attacker to supply a query string like 'a[]=1,2,3,4' even when 'arrayLimit' is set to a lower value. This can lead to the creation of arbitrarily large arrays, causing excessive memory usage and potential denial of service. The issue is particularly concerning as it can be exploited by anyone who can manipulate query strings or form bodies in applications using this package.
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 version below is the minimum fixed release for this vulnerability.
If you need the minimum change
6.16.0
This is the first release that contains the fix.
npm install qs@6.16.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you can validate and sanitize input data before passing it to the 'qs' parser. For example, you can limit the length of the input string or check for the number of elements in the array before processing it. Here is a sample code snippet:
const input = 'a[]=1,2,3,4';
if (input.split(',').length <= 3) {
const result =
qs.
parse(input, options);
} else { throw new
Error('Input exceeds array limit');
}
Conclusion
The 'qs' package vulnerability (CVE-2026-82562) poses a significant risk by allowing attackers to bypass array limits, leading to potential denial of service. It is crucial for developers to update to the patched version (6.16.0 or later) and implement input validation to mitigate this risk.
See every vulnerability recorded for qs →
FAQ
The vulnerability allows attackers to bypass configured array limits, leading to excessive memory allocation and potential denial of service.
Versions of the 'qs' package from 6.14.2 to 6.15.3 are affected by this vulnerability.
You can use Vulert to monitor your application for open-source vulnerabilities. Simply upload your package-lock.json file to receive real-time alerts.
Yes, you can implement input validation and sanitization as a temporary workaround to limit the risk of exploitation.
The CVSS score of this vulnerability is 3.7, indicating a moderate severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for qs.