CVE-2026-2391qs's arrayLimit bypass in comma parsing allows denial of service
### 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.
What to do
Fixed builds are available from Debian, npm: see the table below for the fixed version per release.
Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | node-qs | Fix pending | UBUNTU-CVE-2026-2391 | |
| Ubuntu 26.04 | node-qs | Under investigation | UBUNTU-CVE-2026-2391 | |
| Ubuntu 25.10 | node-qs | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2026-2391 | |
| Ubuntu 24.04 | node-qs | Under investigation | UBUNTU-CVE-2026-2391 | |
| Ubuntu 22.04 | node-qs | Under investigation | UBUNTU-CVE-2026-2391 | |
| Ubuntu 20.04 | node-qs | Fix pending | UBUNTU-CVE-2026-2391 | |
| Ubuntu 18.04 | node-qs | Fix pending | UBUNTU-CVE-2026-2391 | |
| Ubuntu 16.04 | node-qs | Fix pending | UBUNTU-CVE-2026-2391 | |
| Ubuntu 14.04 | node-qs | Fix pending | UBUNTU-CVE-2026-2391 | |
| Debian 14 | node-qs | Fixed | 6.15.0+ds+~6.15.0-1 | DEBIAN-CVE-2026-2391 |
| Debian 13 | node-qs | Fix pending | DEBIAN-CVE-2026-2391 | |
| Debian 12 | node-qs | Fix pending | DEBIAN-CVE-2026-2391 | |
| Red Hat Enterprise Linux 10 | firefox | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | gjs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | gjs-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | linux-sgx | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | sgx-common | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | sgx-libs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | sgx-mpa | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | sgx-pccs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | sgx-pccs-admin | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | sgx-pckid-tool | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | tdx-qgs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | thunderbird | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | firefox | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | firefox-x11 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | gjs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | gjs-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | grafana | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 9 | grafana-selinux | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 9 | linux-sgx | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | pcs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | pcs-snmp | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | polkit | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | polkit-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | polkit-docs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | polkit-libs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | sgx-common | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | sgx-libs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | sgx-mpa | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | sgx-pccs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | sgx-pccs-admin | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | sgx-pckid-tool | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | tdx-qgs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | thunderbird | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | firefox | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | grafana | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | grafana-azure-monitor | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | grafana-cloudwatch | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | grafana-elasticsearch | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | grafana-graphite | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | grafana-influxdb | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | grafana-loki | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | grafana-mssql | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | grafana-mysql | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | grafana-opentsdb | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | grafana-postgres | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | grafana-prometheus | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | grafana-selinux | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | grafana-stackdriver | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | mozjs60 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | mozjs60-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | pcs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | pcs-snmp | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | thunderbird | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | firefox | Fix pending Fix deferred | ||
| npm library | qs | Fixed | 6.14.2 | GHSA-w7fw-mjwx-w883 |
What the vendor says
As published in the CVE record by harborist, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- qs: affected: 6.7.0 to 6.14.1
Vendor advisories:
- https://github.com/ljharb/qs/security/advisories/GHSA-w7fw-mjwx-w883 (vendor-advisory)
- https://github.com/ljharb/qs/commit/f6a7abff1f13d644db9b05fe4f2c98ada6bf8482 (patch)
References
- https://github.com/ljharb/qs/security/advisories/GHSA-w7fw-mjwx-w883
- https://github.com/ljharb/qs/commit/f6a7abff1f13d644db9b05fe4f2c98ada6bf8482
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.