CVE-2026-82562: qs array-limit bypass via bracket-key comma parsing
Summary qs v6.15.3 allows bracket-key input to bypass arrayLimit and throwOnLimitExceeded when comma: true. The input a[]=1,2,3,4 succeeds with arrayLimit: 3, while the equivalent plain-key input is rejected. Affected version tested: Details parseArrayValue() enforces the comma limit only for flat values.
Published Sep 2, 2026
Affected packages
qs
- Ecosystem
- npm
- Affected
- >= 6.14.2, <= 6.15.3
- Fixed in
- 6.16.0
- Check
npm ls qs
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
qs v6.15.3 allows bracket-key input to bypass arrayLimit and throwOnLimitExceeded when comma: true. The input a[]=1,2,3,4 succeeds with arrayLimit: 3, while the equivalent plain-key input is rejected.
Affected version tested:
qs v6.15.3
commit 18d085e919dae70c8f1b200ab99323058edab2c2Details
parseArrayValue() enforces the comma limit only for flat values. The a[] form is marked non-flat, so its comma-separated value is wrapped after parsing and the inner array is not checked. A single parameter can therefore materialize arbitrarily large arrays.
PoC
const qs = require('qs')
const options = { comma: true, arrayLimit: 3, throwOnLimitExceeded: true }
const result = qs.parse('a[]=1,2,3,4', options)
console.log(result.a[0].length) // 4; expected RangeError
const big = qs.parse('a[]=' + '1,'.repeat(1000000) + '1', { comma: true, arrayLimit: 20 })
console.log(big.a[0].length) // 1000001On v6.15.3, the first input parses successfully and the second creates an array with 1,000,001 elements. The equivalent a=1,2,3,4 input throws RangeError as expected.
Impact
An attacker who can supply a query string or form body can bypass configured array limits and force excessive memory allocation, causing denial of service. The limit must be applied after comma splitting and before the resulting array is wrapped.
Credited to Vectrain51, Fcmam5, ljharb.
References
- https://github.com/ljharb/qs/security/advisories/GHSA-w7fw-mjwx-w883
- https://github.com/ljharb/qs/security/advisories/GHSA-x5fp-wj9c-mxmx
- https://nvd.nist.gov/vuln/detail/CVE-2026-82562
- https://github.com/ljharb/qs/commit/8859c37470e11b42b547b275e4e9bd0bc8cc5464
- https://github.com/advisories/GHSA-x5fp-wj9c-mxmx
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-110816
qs : qs.stringify with arrayFormat 'comma' throws an uncaught TypeError on array elements carrying a non-callable own toString (DoS)
medium5.3Oct 27, 2026CVE-2026-82417
qs: Denial of Service via Attacker Controlled isBuffer
medium5.3Sep 2, 2026CVE-2026-8723
qs has a remotely triggerable DoS: qs.stringify crashes with TypeError on null/undefined entries in comma-format arrays when encodeValuesOnly is set
medium5.3May 22, 2026CVE-2026-2391
qs's arrayLimit bypass in comma parsing allows denial of service
low3.7Feb 12, 2026CVE-2025-15284
qs's arrayLimit bypass in its bracket notation allows DoS via memory exhaustion
medium3.7Dec 30, 2025
