Vulnerability
CVE-2026-82562
### Summary When `qs.parse` is called with `comma: true` and `throwOnLimitExceeded: true`, a comma-separated value under a bracket-push key (`a[]=1,2,3,4`) is split into an array without being compared against `arrayLimit`, while the same value under a flat key (`a=1,2,3,4`), an indexed key (`a[0]=`), a nested key (`a[b]=`), or a dotted key (`a.b=` with `allowDots`) throws the documented `RangeError`. A single parameter such as `a[]=1,2,2,...` therefore produces an inner array of arbitrary length even though the caller opted into the hard limit. This is the `[]=` key form that the fix for CVE-2026-2391 (qs 6.14.2) did not cover. ### Details In `lib/parse.js`, a comma-separated value under a `[]=` key is split and then wrapped as a single nested element (`val = [val]`, so that each `a[]=x,y` group counts as one element of the outer array). The `arrayLimit` check that 6.14.2 added for comma values runs after that wrap, so for `[]=` parts it only ever saw the wrapper of length 1. 6.15.3 added a pre-split comma count so that an oversized value throws before it is allocated, but gated it on an `isFlatArrayValue` flag that `parseValues` set to `false` for any part containing `[]=`, and did not pass it for object-valued input, so the gap remained. #### PoC ```js var qs = require('qs'); var options = { comma: true, arrayLimit: 3, throwOnLimitExceeded: true }; qs.parse('a=1,2,3,4', options); // RangeError: Array limit exceeded. Only 3 elements allowed in an array. qs.parse('a[]=1,2,3,4', options); // { a: [ [ '1', '2', '3', '4' ] ] } (no throw) qs.parse('a[]=' + '1,'.repeat(1000000) + '1', { comma: true, arrayLimit: 20, throwOnLimitExceeded: true }); // no throw; a 1,000,001-element inner array is allocated ``` #### Fix `lib/parse.js`, applied in 8859c37 on `main` and released as v6.16.0: the `isFlatArrayValue` gate is removed, so every comma-split value is counted against `arrayLimit` before splitting regardless of key form. An in-limit group under `a[]=` still counts as one element of the outer array, and the default (`throwOnLimitExceeded: false`) path is unchanged. ### Affected versions `>=6.14.2 <6.16.0`, fixed in v6.16.0. v6.14.2 introduced `arrayLimit` enforcement for comma values (the fix for CVE-2026-2391) but only for values not under a `[]=` key, and every release from v6.14.2 through v6.15.3 has the same gap. v6.14.0 and v6.14.1, where `throwOnLimitExceeded` exists but does not apply to any comma form, are covered by CVE-2026-2391 rather than this record. Earlier lines (6.7.x through 6.13.x) have `comma` but no `throwOnLimitExceeded`, so there is no hard cap on any comma path to bypass; releases before 6.7.0 have no `comma` option. ### Impact An unauthenticated attacker who can reach an application that parses untrusted query strings or urlencoded bodies with both `comma: true` and `throwOnLimitExceeded: true` (both non-default) can bypass the configured limit with a single `a[]=` parameter and force the parser to allocate an array proportional to the request size. The cost is strictly linear in the attacker-supplied bytes (about 0.1 microseconds and 6 to 7 retained bytes per input byte; the same out-of-memory threshold as the documented default `throwOnLimitExceeded: false` path), so a transport-layer request or body size limit bounds it completely (and node's default maximum HTTP header size of 16 KB already bounds the request line, so multi-megabyte payloads need a body parser). The impact is that an opt-in hard limit fails open on one key spelling, not unbounded allocation from a small input.
237 advisories report this vulnerability, across 8 ecosystems.
Advisories
- CGA-23mv-m5vc-5m5v
- CGA-25vg-h74q-xxf7
- CGA-28cv-r948-9hw7
- CGA-2c7c-2h7m-hxg8
- CGA-2cj9-x8xh-qqw9
- CGA-2g8v-hc7f-68hj
- CGA-2hm8-g5vc-ph5q
- CGA-2pf9-q5rw-7p5w
- CGA-2q92-vq6g-h8x3
- CGA-2qpr-jqv4-w7q5
- CGA-2rxv-h7h4-xf8h
- CGA-2w78-cfxv-2664
- CGA-2xj2-qf9j-gc44
- CGA-2xx5-7j63-vvxp
- CGA-323r-2mxh-v926
- CGA-33j7-7vx5-2395
- CGA-33w2-96vr-f57v
- CGA-3c59-xw2q-hfxg
- CGA-3g3p-89q5-q6c4
- CGA-3g7q-68r2-hq32
- CGA-3p23-43xm-mpxj
- CGA-3q88-h8jc-mfv6
- CGA-3qcc-qv3x-44c7
- CGA-45c9-g8j8-hmf5
- CGA-495v-fpvc-3cf6
- CGA-4cfq-c7jm-jrv5
- CGA-4fvj-mxjw-pg3x
- CGA-4gwp-5vp3-4j5f
- CGA-4jwf-q3r2-f35x
- CGA-4pc2-2f29-694m
- CGA-4pvh-7wq6-q6v9
- CGA-4rf9-7qx4-75qf
- CGA-4xf7-g3cp-r7c3
- CGA-52mq-h8cc-mxr7
- CGA-5359-xqm4-458v
- CGA-5478-74xg-pqwx
- CGA-55jq-m95x-5vjj
- CGA-56cm-jwhw-3w5m
- CGA-57h6-c8qf-j8qc
- CGA-58rj-pfw6-vr46
- CGA-59qq-86h6-7ffj
- CGA-5gm2-pvhg-9w3x
- CGA-5gw7-9hph-hfj5
- CGA-5q5p-5gm8-496j
- CGA-5r38-f8mq-8583
- CGA-6484-ch2m-xpf4
- CGA-662v-j7m8-xgqc
- CGA-699c-5733-hhgw
- CGA-69xf-824w-7m6f
- CGA-6g32-q69v-7jgw
- CGA-6q3j-v42v-87j5
- CGA-6r5j-rg8v-mfxx
- CGA-6r6q-3mqj-gjr2
- CGA-6v8r-hjvm-mw66
- CGA-6w7h-c79q-rv4v
- CGA-6wph-c9mx-52m9
- CGA-6wrf-v3mq-9mpf
- CGA-732q-9mvm-ghwx
- CGA-769v-6p3q-mw5r
- CGA-778q-hqww-48h3
- CGA-79hm-6rr3-mxp5
- CGA-7g4c-4jm5-2mh5
- CGA-7jcm-26g7-wh7r
- CGA-7v47-66cx-76hj
- CGA-7wmf-m452-q7v5
- CGA-7wmq-fffm-6mmq
- CGA-7xv7-cff2-pfpc
- CGA-825p-v9hr-vv7h
- CGA-82rc-979c-v9rx
- CGA-8c5r-gxvh-98mm
- CGA-8f5m-9rr4-w6g9
- CGA-8hc9-54mh-jrqw
- CGA-8j7p-hr4m-5xxp
- CGA-8pxr-25mq-v8m9
- CGA-8q42-93mq-9pqw
- CGA-8r56-28vw-442q
- CGA-8w36-8w7r-fv5x
- CGA-8w9p-f7rc-qf7w
- CGA-964r-4696-v655
- CGA-96g2-p34j-crmr
- CGA-975r-685h-r26j
- CGA-99pg-6cqq-crpp
- CGA-9hff-25w7-6pr6
- CGA-9pcg-6rh7-793h
- CGA-9vcc-mww7-m628
- CGA-9vch-5wg8-9cfw
- CGA-c494-rrr8-grrw
- CGA-c57f-h36p-f6rm
- CGA-c7wx-3f3g-8ch3
- CGA-cfcv-m6jc-c2wp
- CGA-cmqq-rwr9-q6c2
- CGA-cqxg-wr38-r52v
- CGA-crhf-68fv-qj9h
- CGA-cv96-8229-9cj9
- CGA-cvjm-7fm6-j4xx
- CGA-cvrp-4hqm-fv38
- CGA-cx9j-jcjx-2qwm
- CGA-f6hp-858r-xg2m
- CGA-f7hh-rp73-26f9
- CGA-f8p9-g7qj-7rfp
Showing the first 100. The API lists them all: /api/v1/vulnerabilities/CVE-2026-82562.