CVE-2026-2391
qs's arrayLimit bypass in comma parsing allows denial of service
Also known as GHSA-w7fw-mjwx-w883
Mitigation
- Upgrade qs to 6.14.2 or later.
Who should check
- Projects that depend on npm package qs (>= 6.7.0, < 6.14.2)
- Anyone running qs >= 6.7.0, <= 6.14.1
Vulnerability facts
- Affected
- qs >= 6.7.0, < 6.14.2
- Fixed in
- 6.14.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 6.3 (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Attack requirements: Present
- Privileges required: None
- User interaction: None
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: Low
- Confidentiality impact on other systems: None
- Integrity impact on other systems: None
- Availability impact on other systems: None
- EPSS
- 0.65% chance of exploitation in 30 days (percentile 46, 2026-11-26)
- CWE
- CWE-20
- Modified
Description
### Summary The `arrayLimit` option in qs does not enforce limits for comma-separated values when `comma: true` is enabled, allowing attackers to cause denial-of-service via memory exhaustion. This is a bypass of the array limit enforcement, similar to the bracket notation bypass addressed in GHSA-6rw7-vpxm-498p (CVE-2025-15284). ### Details When the `comma` option is set to `true` (not the default, but configurable in applications), qs allows parsing comma-separated strings as arrays (e.g., `?param=a,b,c` becomes `['a', 'b', 'c']`). However, the limit check for `arrayLimit` (default: 20) and the optional throwOnLimitExceeded occur after the comma-handling logic in `parseArrayValue`, enabling a bypass. This permits creation of arbitrarily large arrays from a single parameter, leading to excessive memory allocation. **Vulnerable code** (lib/parse.js: lines ~40-50): ```js if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) { return val.split(','); } if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) { throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.'); } return val; ``` The `split(',')` returns the array immediately, skipping the subsequent limit check. Downstream merging via `utils.combine` does not prevent allocation, even if it marks overflows for sparse arrays.This discrepancy allows attackers to send a single parameter with millions of commas (e.g., `?param=,,,,,,,,...`), allocating massive arrays in memory without triggering limits. It bypasses the intent of `arrayLimit`, which is enforced correctly for indexed (`a[0]=`) and bracket (`a[]=`) notations (the latter fixed in v6.14.1 per GHSA-6rw7-vpxm-498p). ### PoC **Test 1 - Basic bypass:** ``` npm install qs ``` ```js const qs = require('qs'); const payload = 'a=' + ','.repeat(25); // 26 elements after split (bypasses arrayLimit: 5) const options = { comma: true, arrayLimit: 5, throwOnLimitExceeded: true }; try { const result = qs.parse(payload, options); console.log(result.a.length); // Outputs: 26 (bypass successful) } catch (e) { console.log('Limit enforced:', e.message); // Not thrown } ``` **Configuration:** - `comma: true` - `arrayLimit: 5` - `throwOnLimitExceeded: true` Expected: Throws "Array limit exceeded" error. Actual: Parses successfully, creating an array of length 26. ### Impact Denial of Service (DoS) via memory exhaustion.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm qs | >= 6.7.0, < 6.14.2 | 6.14.2 | osv |
| qs | >= 6.7.0, <= 6.14.1 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-2391. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-2391.md Affected: qs >= 6.7.0, < 6.14.2 Fixed in: 6.14.2 Steps: 1. Search this machine and project for qs (npm), qs: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2026-2391 being exploited?
There is no confirmed exploitation: CVE-2026-2391 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.65% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-2391?
Medium: CVSS 6.3 (v4.0, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2026-2391?
qs >= 6.7.0, < 6.14.2.
Is there a fix for CVE-2026-2391?
Yes. Fixed in 6.14.2. Upgrade qs to 6.14.2 or later.
How do I check if I'm affected by CVE-2026-2391?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.