Medium

qs array-limit bypass via bracket-key comma parsing

  • Disclosed: 02.09.2026
  • Updated: 11.10.2026 10:22

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 18d085e919dae70c8f1b200ab99323058edab2c2

Details

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

js
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) // 1000001

On 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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package qs >= 6.14.2, < 6.16.0 6.16.0

References

CVSS score 3.7/10
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness (CWE)
CWE-770
Platform
npm
Package
qs
Disclosed
02.09.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-x5fp-wj9c-mxmx - CC BY 4.0

Vulnerability history: qs

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (9) in the archive
Total entries
9
First → latest
10.2017 09.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 4
  • Medium 4
  • Low 1

Disclosures per year

  1. 2017: 1
  2. 2018: 1
  3. 2019: 0
  4. 2020: 1
  5. 2021: 0
  6. 2022: 1
  7. 2023: 0
  8. 2024: 0
  9. 2025: 1
  10. 2026: 4
Severity:
  1. qs array-limit bypass via bracket-key comma parsing this entry
    Medium · 3.7 CVE-2026-82562 >= 6.14.2, < 6.16.0 6.16.0
  2. High · 7.5 CVE-2022-24999 >= 6.10.0, < 6.10.3, >= 6.9.0, < 6.9.7, >= 6.8.0, < 6.8.3, >= 6.7.0, < 6.7.3, >= 6.6.0, < 6.6.1, >= 6.5.0, < 6.5.3, >= 6.4.0, < 6.4.1, >= 6.3.0, < 6.3.3, < 6.2.4 6.10.3, 6.9.7, 6.8.3, 6.7.3, 6.6.1, 6.5.3, 6.4.1, 6.3.3, 6.2.4
  3. High · 7.5 CVE-2017-1000048 < 6.0.4, >= 6.1.0, < 6.1.2, >= 6.2.0, < 6.2.3, >= 6.3.0, < 6.3.2 6.0.4, 6.1.2, 6.2.3, 6.3.2
  4. High CVE-2014-10064 < 1.0.0 1.0.0
  5. High CVE-2014-7191 < 1.0.0 1.0.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.