qs's arrayLimit bypass in comma parsing allows denial of service
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 ``
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
qsnpm | >= 6.7.0, < 6.14.2 | 6.14.2 |
Affected products
88- osv-coords88 versionspkg:apk/chainguard/arangodb-3.11pkg:apk/chainguard/arangodb-3.12pkg:apk/chainguard/argo-workflows-ui-3.6pkg:apk/chainguard/argo-workflows-ui-3.7pkg:apk/chainguard/code-serverpkg:apk/chainguard/json-serverpkg:apk/chainguard/kubeflow-centraldashboardpkg:apk/chainguard/kubeflow-pipelines-frontendpkg:apk/chainguard/kubescape-grype-offline-dbpkg:apk/chainguard/langfuse-3pkg:apk/chainguard/langfuse-3-workerpkg:apk/chainguard/langfuse-fips-3pkg:apk/chainguard/langfuse-fips-3-workerpkg:apk/chainguard/librechatpkg:apk/chainguard/opensearch-dashboards-2pkg:apk/chainguard/opensearch-dashboards-2-alerting-dashboards-pluginpkg:apk/chainguard/opensearch-dashboards-2-dashboards-notificationspkg:apk/chainguard/opensearch-dashboards-2-dashboards-query-workbenchpkg:apk/chainguard/opensearch-dashboards-2-dashboards-reportingpkg:apk/chainguard/opensearch-dashboards-2-dashboards-visualizationspkg:apk/chainguard/opensearch-dashboards-2-fipspkg:apk/chainguard/opensearch-dashboards-2-fips-alerting-dashboards-pluginpkg:apk/chainguard/opensearch-dashboards-2-fips-dashboards-notificationspkg:apk/chainguard/opensearch-dashboards-2-fips-dashboards-query-workbenchpkg:apk/chainguard/opensearch-dashboards-2-fips-dashboards-reportingpkg:apk/chainguard/opensearch-dashboards-2-fips-dashboards-visualizationspkg:apk/chainguard/opensearch-dashboards-2-fips-index-management-dashboards-pluginpkg:apk/chainguard/opensearch-dashboards-2-fips-security-analytics-dashboards-pluginpkg:apk/chainguard/opensearch-dashboards-2-fips-security-dashboards-pluginpkg:apk/chainguard/opensearch-dashboards-2-index-management-dashboards-pluginpkg:apk/chainguard/opensearch-dashboards-2-security-analytics-dashboards-pluginpkg:apk/chainguard/opensearch-dashboards-2-security-dashboards-pluginpkg:apk/chainguard/opensearch-dashboards-3pkg:apk/chainguard/opensearch-dashboards-3-alerting-dashboards-pluginpkg:apk/chainguard/opensearch-dashboards-3-dashboards-notificationspkg:apk/chainguard/opensearch-dashboards-3-dashboards-query-workbenchpkg:apk/chainguard/opensearch-dashboards-3-dashboards-reportingpkg:apk/chainguard/opensearch-dashboards-3-fipspkg:apk/chainguard/opensearch-dashboards-3-fips-alerting-dashboards-pluginpkg:apk/chainguard/opensearch-dashboards-3-fips-dashboards-notificationspkg:apk/chainguard/opensearch-dashboards-3-fips-dashboards-query-workbenchpkg:apk/chainguard/opensearch-dashboards-3-fips-dashboards-reportingpkg:apk/chainguard/opensearch-dashboards-3-fips-index-management-dashboards-pluginpkg:apk/chainguard/opensearch-dashboards-3-fips-security-analytics-dashboards-pluginpkg:apk/chainguard/opensearch-dashboards-3-fips-security-dashboards-pluginpkg:apk/chainguard/opensearch-dashboards-3-index-management-dashboards-pluginpkg:apk/chainguard/opensearch-dashboards-3-security-analytics-dashboards-pluginpkg:apk/chainguard/opensearch-dashboards-3-security-dashboards-pluginpkg:apk/chainguard/pelias-apipkg:apk/chainguard/redisinsightpkg:apk/chainguard/safpkg:apk/chainguard/sqlpadpkg:apk/chainguard/thingsboard-tb-js-executorpkg:apk/chainguard/thingsboard-tb-js-executor-fipspkg:apk/chainguard/thingsboard-tb-web-uipkg:apk/chainguard/thingsboard-tb-web-ui-fipspkg:apk/chainguard/tileserver-glpkg:apk/chainguard/tileserver-gl-fipspkg:apk/wolfi/argo-workflows-ui-3.7pkg:apk/wolfi/code-serverpkg:apk/wolfi/json-serverpkg:apk/wolfi/kubeflow-centraldashboardpkg:apk/wolfi/kubeflow-pipelines-frontendpkg:apk/wolfi/langfuse-3pkg:apk/wolfi/langfuse-3-workerpkg:apk/wolfi/opensearch-dashboards-2pkg:apk/wolfi/opensearch-dashboards-2-alerting-dashboards-pluginpkg:apk/wolfi/opensearch-dashboards-2-dashboards-notificationspkg:apk/wolfi/opensearch-dashboards-2-dashboards-query-workbenchpkg:apk/wolfi/opensearch-dashboards-2-dashboards-reportingpkg:apk/wolfi/opensearch-dashboards-2-dashboards-visualizationspkg:apk/wolfi/opensearch-dashboards-2-index-management-dashboards-pluginpkg:apk/wolfi/opensearch-dashboards-2-security-analytics-dashboards-pluginpkg:apk/wolfi/opensearch-dashboards-2-security-dashboards-pluginpkg:apk/wolfi/opensearch-dashboards-3pkg:apk/wolfi/opensearch-dashboards-3-alerting-dashboards-pluginpkg:apk/wolfi/opensearch-dashboards-3-dashboards-notificationspkg:apk/wolfi/opensearch-dashboards-3-dashboards-query-workbenchpkg:apk/wolfi/opensearch-dashboards-3-dashboards-reportingpkg:apk/wolfi/opensearch-dashboards-3-index-management-dashboards-pluginpkg:apk/wolfi/opensearch-dashboards-3-security-analytics-dashboards-pluginpkg:apk/wolfi/opensearch-dashboards-3-security-dashboards-pluginpkg:apk/wolfi/safpkg:apk/wolfi/sqlpadpkg:apk/wolfi/thingsboard-tb-js-executorpkg:apk/wolfi/thingsboard-tb-web-uipkg:apk/wolfi/tileserver-glpkg:npm/qs
< 3.11.14.3-r0+ 87 more
- (no CPE)range: < 3.11.14.3-r0
- (no CPE)range: < 3.12.7.2-r2
- (no CPE)range: < 3.6.19-r0
- (no CPE)range: < 3.7.10-r0
- (no CPE)range: < 4.106.3-r5
- (no CPE)range: < 0.17.4-r5
- (no CPE)range: < 1.10.0-r11
- (no CPE)range: < 2.15.0-r12
- (no CPE)range: < 0_git20250804-r1
- (no CPE)range: < 3.155.1-r2
- (no CPE)range: < 3.155.1-r2
- (no CPE)range: < 3.155.1-r1
- (no CPE)range: < 3.155.1-r1
- (no CPE)range: < 0.8.3-r1
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 7.6.0-r2
- (no CPE)range: < 3.0.3-r1
- (no CPE)range: < 1.6.0-r0
- (no CPE)range: < 7.5.7-r10
- (no CPE)range: < 4.3.0.1-r1
- (no CPE)range: < 4.3.0.1-r1
- (no CPE)range: < 4.3.0.1-r1
- (no CPE)range: < 4.3.0.1-r1
- (no CPE)range: < 5.5.0-r4
- (no CPE)range: < 5.5.0-r5
- (no CPE)range: < 3.7.10-r0
- (no CPE)range: < 4.106.3-r5
- (no CPE)range: < 0.17.4-r5
- (no CPE)range: < 1.10.0-r11
- (no CPE)range: < 2.15.0-r12
- (no CPE)range: < 3.155.1-r2
- (no CPE)range: < 3.155.1-r2
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 2.19.4-r10
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 3.5.0-r1
- (no CPE)range: < 1.6.0-r0
- (no CPE)range: < 7.5.7-r10
- (no CPE)range: < 4.3.0.1-r1
- (no CPE)range: < 4.3.0.1-r1
- (no CPE)range: < 5.5.0-r4
- (no CPE)range: >= 6.7.0, < 6.14.2
Patches
Vulnerability mechanics
References
4- github.com/ljharb/qs/commit/f6a7abff1f13d644db9b05fe4f2c98ada6bf8482ghsapatchWEB
- github.com/advisories/GHSA-w7fw-mjwx-w883ghsaADVISORY
- github.com/ljharb/qs/security/advisories/GHSA-w7fw-mjwx-w883ghsavendor-advisoryWEB
- nvd.nist.gov/vuln/detail/CVE-2026-2391ghsaADVISORY
News mentions
0No linked articles in our index yet.