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).
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):
| |
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).
Test 1 - Basic bypass:
| |
| |
Configuration:
comma: truearrayLimit: 5throwOnLimitExceeded: trueExpected: Throws Array limit exceeded error. Actual: Parses successfully, creating an array of length 26.
Denial of Service (DoS) via memory exhaustion.
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Qs | Qs_project | 6.7.0 (including) | 6.14.2 (excluding) |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/cephcsi-rhel9:1795073870 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/cephcsi-rhel9-operator:1795073546 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/devicefinder-rhel9:1795073967 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/mcg-core-rhel9:1795074158 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/mcg-rhel9-operator:1795074167 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/ocs-client-console-rhel9:1795074655 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/ocs-client-rhel9-operator:1795074170 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/ocs-metrics-exporter-rhel9:1795074383 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/ocs-rhel9-operator:1795074368 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odf-blackbox-exporter-rhel9:1795074330 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odf-cli-rhel9:1795074438 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odf-cloudnative-pg-rhel9-operator:1795074371 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odf-console-rhel9:1795074803 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odf-cosi-sidecar-rhel9:1795074454 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odf-csi-addons-rhel9-operator:1795074485 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odf-csi-addons-sidecar-rhel9:1795074572 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odf-drbd-rhel9:1795074668 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odf-external-snapshot-metadata-sidecar-rhel9:1795074674 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odf-external-snapshotter-rhel9-operator:1795074723 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odf-external-snapshotter-sidecar-rhel9:1795074744 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odf-multicluster-console-rhel9:1795075063 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odf-multicluster-rhel9-operator:1795074810 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odf-must-gather-rhel9:1795074944 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odf-rhel9-operator:1795074987 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odr-rhel9-operator:1795074981 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odr-volsync-plugin-mover-rhel9:1795075376 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/odr-volsync-plugin-rhel9-operator:1795075367 | * |
| Red Hat Openshift Data Foundation 5.0 | RedHat | odf5/rook-ceph-rhel9-operator:1795075598 | * |
| Node-qs | Ubuntu | esm-apps/xenial | * |
| Node-qs | Ubuntu | questing | * |
Input validation is a frequently-used technique for checking potentially dangerous inputs in order to ensure that the inputs are safe for processing within the code, or when communicating with other components. Input can consist of:
Data can be simple or structured. Structured data can be composed of many nested layers, composed of combinations of metadata and raw data, with other simple or structured data. Many properties of raw data or metadata may need to be validated upon entry into the code, such as:
Implied or derived properties of data must often be calculated or inferred by the code itself. Errors in deriving properties may be considered a contributing factor to improper input validation.