Vulnerability
CVE-2026-2391
### 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.
299 advisories report this vulnerability, across 7 ecosystems.
Advisories
-
AZL-77594
CVE-2026-2391 affecting package js-jquery 3.5.0-4
-
AZL-77597
CVE-2026-2391 affecting package nodejs-nodemon 2.0.3-5
-
AZL-77601
CVE-2026-2391 affecting package js-jquery 3.5.0-4
-
AZL-77616
CVE-2026-2391 affecting package nodejs-nodemon 2.0.3-4
- CGA-224v-cxpp-8w72
- CGA-22vm-jx44-x8p5
- CGA-242p-72m2-38g9
- CGA-2478-7q7c-pmrf
- CGA-2598-4rv8-92hg
- CGA-25c3-v438-5769
- CGA-26w7-xf68-jvfw
- CGA-273c-prc8-hrrv
- CGA-28v3-rxvc-mg7w
- CGA-29xr-h626-2mww
- CGA-2cvv-57g4-2wjj
- CGA-2mfm-33m2-gv93
- CGA-2vv5-xp8q-2qxf
- CGA-2xqc-hmp4-jjr8
- CGA-35g7-pj9c-8rhw
- CGA-397h-g88f-g68q
- CGA-39pv-8q59-mw97
- CGA-3gq4-67mr-f9pp
- CGA-3h7v-r362-5gwp
- CGA-3j9j-fgh8-r826
- CGA-3jh8-5j3h-w739
- CGA-3jm7-gx7c-c6g4
- CGA-3jrj-gv33-2q6p
- CGA-3m26-w7pf-gcfq
- CGA-3mg8-qxqv-hq7c
- CGA-3pf6-jgfw-4hjx
- CGA-3pv8-r423-h3vw
- CGA-3q36-rcpx-27pv
- CGA-3v35-p8rg-r38r
- CGA-3wjj-9xj3-g3h6
- CGA-3xwv-v43v-6f9v
- CGA-42gq-mghr-4hpw
- CGA-4666-553j-6j66
- CGA-468m-8rx3-589j
- CGA-46ff-3rvp-4jv9
- CGA-46xj-hvfj-96qm
- CGA-4728-wwjf-jgmx
- CGA-4g33-7gqp-xwp6
- CGA-4h4w-m8hw-mcvp
- CGA-4q4g-9xfp-45v6
- CGA-4r88-g64w-7rjc
- CGA-53qq-6p62-hjv7
- CGA-56pj-68cj-j7ww
- CGA-57xj-9gjm-2952
- CGA-5c9x-jmxx-q796
- CGA-5fjj-5mgp-42f5
- CGA-5hjg-jrhj-q52q
- CGA-5j57-m97g-rgc9
- CGA-5m9p-vw4p-gw5j
- CGA-5pwv-6264-845g
- CGA-5q57-h9wx-q8jv
- CGA-5qxx-h5wq-hxq6
- CGA-5rq6-jmgx-5hhm
- CGA-5v5g-8994-8cxp
- CGA-5xrq-rrcv-2g27
- CGA-6499-qv2f-8f8x
- CGA-69j6-g7r7-pjmp
- CGA-69v5-pmh9-crg3
- CGA-6c76-vf8q-7ghm
- CGA-6gq5-x6rj-pqjr
- CGA-6jpg-m9qf-5244
- CGA-6p23-5qgm-6j6g
- CGA-6qpg-f2rq-h73c
- CGA-6rf2-v7w3-8gj4
- CGA-6v5j-jfmp-9785
- CGA-6v7x-j6jf-4v8r
- CGA-6w32-pxm4-w273
- CGA-6wjr-pfmh-rgjm
- CGA-76hf-hg7p-v792
- CGA-76rm-m4r7-87m3
- CGA-76wq-7m9g-rmrx
- CGA-78wp-h489-87qw
- CGA-795c-9wv8-2cq4
- CGA-79r2-j64q-q39v
- CGA-7ch7-23qp-hh56
- CGA-7hgc-3m7f-wj5v
- CGA-7m5m-6w7r-m3q5
- CGA-7p32-52jr-gcpj
- CGA-7q5f-5h28-c2f4
- CGA-7qp9-wpfg-q3xc
- CGA-832w-7r6f-83cp
- CGA-86g6-m997-cvv7
- CGA-87g7-p2qr-89q9
- CGA-8grw-2g29-f7mp
- CGA-8h32-g75x-9qx9
- CGA-8h5f-fv28-9ff2
- CGA-8hvj-4mrv-92m7
- CGA-8jh5-q6gq-jgvp
- CGA-8mhj-322m-487p
- CGA-8p96-jjh7-5pj7
- CGA-8q4f-m928-9363
- CGA-8qhv-p4p3-f84x
- CGA-8qmj-vjvc-p85c
- CGA-8wrg-fcfh-mgxp
- CGA-92v2-fq6p-qc6q
- CGA-93w8-cwqq-xw9m
Showing the first 100. The API lists them all: /api/v1/vulnerabilities/CVE-2026-2391.