Skip to content

CVE-2026-2391 qs's arrayLimit bypass in comma parsing allows denial of service

MediumCVSS 6.3 EPSS 0.53%
Published
Updated
Exploit status
No public exploit known

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):

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.

Affected products

ProductAffected versionsFixed in
npm qs(npm) >= 6.7.0, <= 6.14.1 No fix listed
debian/node-qs(Debian:12) All versions No fix listed
debian/node-qs(Debian:12) = 6.11.0+ds+~6.9.7-3 No fix listed
debian/node-qs(Debian:12) = 6.11.0+ds+~6.9.7-4 No fix listed
debian/node-qs(Debian:12) = 6.13.0+ds+~6.9.16-1 No fix listed
debian/node-qs(Debian:12) = 6.14.1+ds+~6.14.0-1 No fix listed
debian/node-qs(Debian:12) = 6.15.0+ds+~6.15.0-1 No fix listed
debian/node-qs(Debian:12) = 6.15.0+ds+~6.15.0-2 No fix listed
debian/node-qs(Debian:12) = 6.15.0+ds+~6.15.0-3 No fix listed
debian/node-qs(Debian:12) = 6.15.2+ds+~6.15.1-1 No fix listed
debian/node-qs(Debian:12) = 6.16.0+ds+~6.15.1-1 No fix listed
debian/node-qs(Debian:13) All versions No fix listed
debian/node-qs(Debian:13) = 6.13.0+ds+~6.9.16-1 No fix listed
debian/node-qs(Debian:13) = 6.14.1+ds+~6.14.0-1 No fix listed
debian/node-qs(Debian:13) = 6.15.0+ds+~6.15.0-1 No fix listed
debian/node-qs(Debian:13) = 6.15.0+ds+~6.15.0-2 No fix listed
debian/node-qs(Debian:13) = 6.15.0+ds+~6.15.0-3 No fix listed
debian/node-qs(Debian:13) = 6.15.2+ds+~6.15.1-1 No fix listed
debian/node-qs(Debian:13) = 6.16.0+ds+~6.15.1-1 No fix listed
debian/node-qs(Debian:14) < 6.15.0+ds+~6.15.0-1 6.15.0+ds+~6.15.0-1
debian/node-qs(Debian:14) = 6.13.0+ds+~6.9.16-1 No fix listed
debian/node-qs(Debian:14) = 6.14.1+ds+~6.14.0-1 No fix listed
ubuntu/node-qs(Ubuntu:22.04) All versions No fix listed
redhat/cryostat/cryostat-openshift-console-plugin-rhel9(Red Hat:cryostat:4) All versions No fix listed
redhat/io.cryostat-cryostat(Red Hat:cryostat:4) All versions No fix listed
Show 88 more
ProductAffected versionsFixed in
redhat/openshift-logging/cluster-logging-operator-bundle(Red Hat:logging:5) All versions No fix listed
redhat/openshift-logging/cluster-logging-rhel9-operator(Red Hat:logging:5) All versions No fix listed
redhat/openshift-logging/elasticsearch6-rhel9(Red Hat:logging:5) All versions No fix listed
redhat/openshift-logging/elasticsearch-operator-bundle(Red Hat:logging:5) All versions No fix listed
redhat/openshift-logging/elasticsearch-proxy-rhel9(Red Hat:logging:5) All versions No fix listed
redhat/openshift-logging/elasticsearch-rhel9-operator(Red Hat:logging:5) All versions No fix listed
redhat/openshift-logging/eventrouter-rhel9(Red Hat:logging:5) All versions No fix listed
redhat/openshift-logging/fluentd-rhel9(Red Hat:logging:5) All versions No fix listed
redhat/openshift-logging/kibana6-rhel8(Red Hat:logging:5) All versions No fix listed
redhat/openshift-logging/log-file-metric-exporter-rhel9(Red Hat:logging:5) All versions No fix listed
redhat/openshift-logging/logging-curator5-rhel9(Red Hat:logging:5) All versions No fix listed
redhat/openshift-logging/logging-view-plugin-rhel9(Red Hat:logging:5) All versions No fix listed
redhat/openshift-logging/vector-rhel9(Red Hat:logging:5) All versions No fix listed
redhat/mta/mta-ui-rhel9(Red Hat:migration_toolkit_applications:8) All versions No fix listed
redhat/workload-availability/node-remediation-console-rhel8(Red Hat:workload_availability_nhc:0) All versions No fix listed
redhat/openshift-lightspeed/lightspeed-console-plugin-pf5-rhel9(Red Hat:openshift_lightspeed:1) All versions No fix listed
redhat/openshift-lightspeed/lightspeed-console-plugin-rhel9(Red Hat:openshift_lightspeed:1) All versions No fix listed
redhat/openshift-pipelines/pipelines-hub-api-rhel8(Red Hat:openshift_pipelines:1) All versions No fix listed
redhat/openshift-pipelines/pipelines-hub-db-migration-rhel8(Red Hat:openshift_pipelines:1) All versions No fix listed
redhat/openshift-pipelines/pipelines-hub-ui-rhel8(Red Hat:openshift_pipelines:1) All versions No fix listed
redhat/3scale-amp20/system(Red Hat:3scale:2.13) All versions No fix listed
redhat/3scale-amp21/system(Red Hat:3scale:2.13) All versions No fix listed
redhat/3scale-amp22/system(Red Hat:3scale:2.13) All versions No fix listed
redhat/3scale-amp24/system(Red Hat:3scale:2.13) All versions No fix listed
redhat/3scale-amp25/system(Red Hat:3scale:2.13) All versions No fix listed
redhat/3scale-amp26/system(Red Hat:3scale:2.13) All versions No fix listed
redhat/3scale-amp2/system-rhel7(Red Hat:3scale:2.13) All versions No fix listed
redhat/3scale-amp2/system-rhel8(Red Hat:3scale:2.13) All versions No fix listed
redhat/3scale-amp2/system-rhel9(Red Hat:3scale:2.13) All versions No fix listed
redhat/rhacm2/volsync-operator-bundle(Red Hat:acm:2) All versions No fix listed
redhat/rhacm2/volsync-rhel9(Red Hat:acm:2) All versions No fix listed
redhat/org.jolokia-jolokia-parent(Red Hat:amq_broker:7) All versions No fix listed
redhat/ansible-automation-platform-24/lightspeed-rhel8(Red Hat:ansible_automation_platform:2) All versions No fix listed
redhat/ansible-automation-platform-25/lightspeed-rhel8(Red Hat:ansible_automation_platform:2) All versions No fix listed
redhat/ansible-automation-platform/automation-dashboard-rhel9(Red Hat:ansible_automation_platform:2) All versions No fix listed
redhat/io.hawt-project(Red Hat:apache_camel_hawtio:4) All versions No fix listed
redhat/io.apicurio-apicurio-registry(Red Hat:service_registry:2) All versions No fix listed
redhat/org.optaweb.vehiclerouting-optaweb-vehicle-routing(Red Hat:optaplanner:::el6) All versions No fix listed
redhat/org.infinispan-infinispan-console(Red Hat:jboss_data_grid:8) All versions No fix listed
redhat/rhdh/rhdh-hub-rhel9(Red Hat:rhdh:1) All versions No fix listed
redhat/discovery/discovery-ui-rhel9(Red Hat:discovery:2::el8) All versions No fix listed
redhat/firefox(Red Hat:enterprise_linux:10) All versions No fix listed
redhat/gjs(Red Hat:enterprise_linux:10) All versions No fix listed
redhat/linux-sgx(Red Hat:enterprise_linux:10) All versions No fix listed
redhat/thunderbird(Red Hat:enterprise_linux:10) All versions No fix listed
redhat/firefox(Red Hat:rhel_els:7) All versions No fix listed
redhat/firefox(Red Hat:enterprise_linux:8) All versions No fix listed
redhat/grafana(Red Hat:enterprise_linux:8) All versions No fix listed
redhat/mozjs60(Red Hat:enterprise_linux:8) All versions No fix listed
redhat/pcs(Red Hat:enterprise_linux:8) All versions No fix listed
redhat/thunderbird(Red Hat:enterprise_linux:8) All versions No fix listed
redhat/firefox(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/gjs(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/grafana(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/linux-sgx(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/pcs(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/polkit(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/thunderbird(Red Hat:enterprise_linux:9) All versions No fix listed
redhat/io.apicurio-apicurito(Red Hat:jboss_fuse:7) All versions No fix listed
redhat/io.hawt-hawtio-integration(Red Hat:jboss_fuse:7) All versions No fix listed
redhat/io.hawt-hawtio-online(Red Hat:jboss_fuse:7) All versions No fix listed
redhat/io.hawt-project(Red Hat:jboss_fuse:7) All versions No fix listed
redhat/io.syndesis-syndesis-parent(Red Hat:jboss_fuse:7) All versions No fix listed
redhat/io.syndesis-syndesis-ui(Red Hat:jboss_fuse:7) All versions No fix listed
redhat/io.hawt-project(Red Hat:jboss_enterprise_application_platform:7) All versions No fix listed
redhat/org.jboss.hal-hal-parent(Red Hat:jboss_enterprise_application_platform:7) All versions No fix listed
redhat/io.hawt-project(Red Hat:jboss_enterprise_application_platform:8) All versions No fix listed
redhat/io.smallrye-smallrye-open-api-parent(Red Hat:jboss_enterprise_application_platform:8) All versions No fix listed
redhat/org.keycloak-keycloak-parent(Red Hat:jboss_enterprise_application_platform:8) All versions No fix listed
redhat/io.hawt-project(Red Hat:jbosseapxp) All versions No fix listed
redhat/io.smallrye-smallrye-open-api-parent(Red Hat:jbosseapxp) All versions No fix listed
redhat/org.keycloak-keycloak-parent(Red Hat:jbosseapxp) All versions No fix listed
redhat/rhoai/odh-data-science-pipelines-argo-argoexec-rhel8(Red Hat:openshift_ai) All versions No fix listed
redhat/rhoai/odh-data-science-pipelines-argo-workflowcontroller-rhel8(Red Hat:openshift_ai) All versions No fix listed
redhat/openshift4/ose-console-rhel9(Red Hat:openshift:4) All versions No fix listed
redhat/odf4/mcg-core-rhel9(Red Hat:openshift_data_foundation:4) All versions No fix listed
redhat/devspaces/dashboard-rhel9(Red Hat:openshift_devspaces:3) All versions No fix listed
redhat/org.kie-process-migration-service(Red Hat:jboss_bpms:7) All versions No fix listed
redhat/org.kie.workbench-kie-wb-common(Red Hat:jboss_bpms:7) All versions No fix listed
redhat/org.uberfire-uberfire-parent(Red Hat:jboss_bpms:7) All versions No fix listed
redhat/quay/quay-rhel8(Red Hat:quay:3) All versions No fix listed
redhat/com.github.streamshub-console(Red Hat:amq_streams:2) All versions No fix listed
redhat/com.github.streamshub-console(Red Hat:amq_streams:3) All versions No fix listed
ubuntu/node-qs(Ubuntu:24.04) All versions No fix listed
ubuntu/node-qs(Ubuntu:26.04) All versions No fix listed
ubuntu/node-qs(Ubuntu:26.10) All versions No fix listed
qs project qs >= 6.7.0, < 6.14.2 6.14.2
npm qs(npm) >= 6.7.0, < 6.14.2 6.14.2

References