Skip to content
OpenAdvisories
Low · 3.7 CVE-2026-2391 EUVD-2026-6720GHSA-w7fw-mjwx-w883

qs's arrayLimit bypass in comma parsing allows denial of service

Published Feb 12, 2026 · Updated Feb 12, 2026 · Assigned by harborist

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 products

VendorProductAffectedFixed
— qs 6.7.0 – ≤ 6.14.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 node-qs 6.15.0+ds+~6.15.0-1 —
Debian 13 node-qs No fix yet —
Debian 12 node-qs No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 node-qs No fix yet —
Ubuntu 26.04 LTS node-qs No fix yet —
Ubuntu 25.10 node-qs No fix yet —
Ubuntu 24.04 LTS node-qs No fix yet —
Ubuntu 22.04 LTS node-qs No fix yet —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS node-qs No fix yet —
Ubuntu 16.04 LTS node-qs No fix yet —
Ubuntu Pro 20.04 LTS node-qs No fix yet —
Ubuntu Pro 14.04 LTS node-qs No fix yet —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 js-jquery +1 No fix yet —
Azure Linux 2 (CBL-Mariner) js-jquery +1 No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling code-server 4.106.3-r5 —
Wolfi rolling json-server 0.17.4-r5 —
Wolfi rolling jupyter-base-notebook 7.6.3-r2 —
Wolfi rolling katib-earlystopping +8 0.19.0-r31 —
Wolfi rolling katib-suggestion-goptuna-compat 0.19.0-r40 —
Wolfi rolling kubeflow-centraldashboard 1.10.0-r11 —
Wolfi rolling kubeflow-pipelines-frontend 2.15.0-r12 —
Wolfi rolling langfuse-3 +1 3.155.1-r2 —
Wolfi rolling opensearch-dashboards-3 3.5.0-r0 —
Wolfi rolling opensearch-dashboards-3-dashboards-reporting +6 3.5.0-r1 —
Wolfi rolling py3.10-jupyterlab +3 4.6.1-r1 —
Wolfi rolling saf 1.6.0-r0 —
Wolfi rolling sqlpad 7.5.7-r10 —
Wolfi rolling thingsboard-tb-web-ui +1 4.3.0.1-r1 —
Wolfi rolling tileserver-gl 5.5.0-r4 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm qs >= 6.7.0, < 6.14.2 6.14.2 GHSA-w7fw-mjwx-w883

Advisories 6

References