Improper Input Validation vulnerability in qs (parse modules) allows HTTP DoS.This issue affects qs: < 6.14.1.
Summary
The arrayLimit option in qs did not enforce limits for bracket notation (a[]=1&a[]=2), only for indexed notation (a[0]=1). This is a consistency bug; arrayLimit should apply uniformly across all array notations.
Note: The default parameterLimit of 1000 effectively mitigates the DoS scenario originally described. With default options, bracket notation cannot produce arrays larger than parameterLimit regardless of arrayLimit, because each a[]=valueconsumes one parameter slot. The severity has been reduced accordingly.
Details
The arrayLimit option only checked limits for indexed notation (a[0]=1&a[1]=2) but did not enforce it for bracket notation (a[]=1&a[]=2).
Vulnerable code (lib/parse.js:159-162):
if (root === [] && options.parseArrays) { obj = utils.combine([], leaf); // No arrayLimit check }
Working code (lib/parse.js:175):
else if (index <= options.arrayLimit) { // Limit checked here obj = []; obj[index] = leaf; }
The bracket notation handler at line 159 uses utils.combine([], leaf) without validating against options.arrayLimit, while indexed notation at line 175 checks index <= options.arrayLimit before creating arrays.
PoC
const qs = require(qs); const result = qs.parse(a[]=1&a[]=2&a[]=3&a[]=4&a[]=5&a[]=6, { arrayLimit: 5 }); console.log(result.a.length); // Output: 6 (should be max 5)
Note on parameterLimit interaction: The original advisorys DoS demonstration claimed a length of 10,000, but parameterLimit (default: 1000) caps parsing to 1,000 parameters. With default options, the actual output is 1,000, not 10,000.
Impact
Consistency bug in arrayLimit enforcement. With default parameterLimit, the practical DoS risk is negligible since parameterLimit already caps the total number of parsed parameters (and thus array elements from bracket notation). The risk increases only when parameterLimit is explicitly set to a very high value.
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 |
|---|---|---|---|
| Cryostat 4 on RHEL 9 | RedHat | cryostat/cryostat-openshift-console-plugin-rhel9:4.1.0-16 | * |
| Network Observability (NETOBSERV) 1.11.0 | RedHat | network-observability/network-observability-console-plugin-compat-rhel9:sha256:a9d0f02ab4310c5a2b2026f424a07d35bcd2ab74e5f9fabba10a2514bef29545 | * |
| Network Observability (NETOBSERV) 1.11.0 | RedHat | network-observability/network-observability-console-plugin-rhel9:sha256:bb0f0e05c7bb037cd07c260a8fcea50fb62cc433d8cd504c4bb065f994c359c6 | * |
| Red Hat Advanced Cluster Security 4.8 | RedHat | advanced-cluster-security/rhacs-main-rhel8:sha256:438b4904d97ca6cd51284955f284c0b078af30859460eb1ed608e20535ccc2c8 | * |
| Red Hat Advanced Cluster Security 4.9 | RedHat | advanced-cluster-security/rhacs-main-rhel8:sha256:1324d938cf5047df9125eb4bf6a9565fc4443b62c24e34494c1f57d1f8b5bdb1 | * |
| Red Hat Advanced Cluster Security 4.9 | RedHat | advanced-cluster-security/rhacs-main-rhel8:sha256:896bba113fa4ba5eab3bc944d58f7492b55945e2802845edee9362b0682ab419 | * |
| Red Hat Ansible Automation Platform 2.6 | RedHat | ansible-automation-platform-26/gateway-rhel9:sha256:932a5db05aba507f85a7e404e8848d3a2009838222e6b1ede8c13b0f33188fab | * |
| Red Hat Developer Hub 1.7 | RedHat | rhdh/rhdh-hub-rhel9:sha256:29ada5e84c6b204cf518191a21bbd22de5cb53a61bc1812b1072ce5c28a235b2 | * |
| Red Hat Developer Hub 1.8 | RedHat | rhdh/rhdh-hub-rhel9:sha256:7185a8f744022307c7a178d35e7ae32d7797eed4f9379b2dba8954e2856f2ed1 | * |
| Red Hat Discovery 2 | RedHat | discovery/discovery-ui-rhel9:sha256:899bd7f941512d54af8ab369ca03028a7d27d05887ccce24bc12c7ccd3e4dbee | * |
| Red Hat multicluster global hub 1.4.4 | RedHat | multicluster-globalhub/multicluster-globalhub-grafana-rhel9:sha256:945a8497173aaba167a71fb4a393714905dd2d00ede0a4eb09c00c4c59727414 | * |
| Red Hat multicluster global hub 1.5.3 | RedHat | multicluster-globalhub/multicluster-globalhub-grafana-rhel9:sha256:dc828bf3a86cb0680173e896579f7bd411a0e4f0962ab0ed9903e69c65c13a26 | * |
| Red Hat OpenShift Container Platform 4.17 | RedHat | openshift4/ose-monitoring-plugin-rhel9:sha256:c36067ed475b1935c820c413ea999ac5af219f79e548f11ff8d4c5943ba5cf87 | * |
| Red Hat OpenShift Container Platform 4.18 | RedHat | openshift4/ose-monitoring-plugin-rhel9:sha256:2625ac00046f3f6ce16dcb2ae0036ce3ab3cea55f019985e500698243b4ffad5 | * |
| Red Hat OpenShift Container Platform 4.19 | RedHat | openshift4/ose-monitoring-plugin-rhel9:sha256:2b092b348964e17cb17a78672361189c3b81e1aa833614daface062c89601cd2 | * |
| Red Hat OpenShift Container Platform 4.2 | RedHat | openshift4/ose-monitoring-plugin-rhel9:sha256:4c35e5d75482b58c8ef656f864a37a5426533737cc155869ae8f8f4812c0daaa | * |
| Red Hat OpenShift Container Platform 4.21 | RedHat | openshift4/ose-monitoring-plugin-rhel9:sha256:d289ef93e6e179405cae0db5309865f76cefababf168006abf09fc3a51a32bcc | * |
| Red Hat OpenShift Dev Spaces (RHOSDS) 3.26 | RedHat | devspaces/code-rhel9:sha256:a85afca6643f11c1e0d3976d5e679cea06d85675a5859e7e08611139f2450520 | * |
| Red Hat OpenShift Dev Spaces (RHOSDS) 3.26 | RedHat | devspaces/dashboard-rhel9:sha256:ba7fc29722ef40b1565978c1f578786ccb65752bc82f50b794f3c5ab0c789d2a | * |
| Red Hat OpenShift Dev Spaces (RHOSDS) 3.26 | RedHat | devspaces/openvsx-rhel9:sha256:de30783c5550d7dc3ebd71507ce41e4a6f6209663299453aaf35b73f17d161d8 | * |
| Red Hat OpenShift Dev Spaces (RHOSDS) 3.26 | RedHat | devspaces/pluginregistry-rhel9:sha256:bc68ad64665acf9c4807bb4f4ae920da7c2a82716c8bc151bd269a4f234fc69e | * |
| Red Hat OpenShift Service Mesh 2.6 | RedHat | openshift-service-mesh/kiali-ossmc-rhel8:sha256:ee28a1278a21783acbda367a8f10d51dd81a7f4af5dcba64c1d58402bac0b43d | * |
| Red Hat OpenShift Service Mesh 2.6 | RedHat | openshift-service-mesh/kiali-rhel8:sha256:f7701158e0b0c3b0091d30be1dfe2fba73386160536929025504e903cf8c8bd9 | * |
| Red Hat OpenShift Service Mesh 3.0 | RedHat | openshift-service-mesh/kiali-ossmc-rhel9:sha256:19c44dfb277123122abafc25552fe408ea7ad6dc026aa592f53e3a754ca0a44f | * |
| Red Hat OpenShift Service Mesh 3.0 | RedHat | openshift-service-mesh/kiali-rhel9:sha256:6300ec1cc673e8eb40333fe98e69845c995116a5c4c80cf37f78209fc3ad1883 | * |
| Red Hat OpenShift Service Mesh 3.1 | RedHat | openshift-service-mesh/kiali-ossmc-rhel9:sha256:84dfc3c35747d81138244b4aa9893f9f1d21775717a4014d328eb5701d832569 | * |
| Red Hat OpenShift Service Mesh 3.1 | RedHat | openshift-service-mesh/kiali-rhel9:sha256:a60d01bfe3bfa2dc484f9d940b71538f0b3732cb77db883edb7a93cf42f2992e | * |
| Red Hat OpenShift Service Mesh 3.2 | RedHat | openshift-service-mesh/kiali-ossmc-rhel9:sha256:700c2524c0def53bf8e5f7832c27496a3e9ff5c9d939d38c59a7fae167418e16 | * |
| Red Hat OpenShift Service Mesh 3.2 | RedHat | openshift-service-mesh/kiali-rhel9:sha256:a97c82b48b920f1d3843d08dbe55d3759b237365e2b97501a640a1c0bd08d5ca | * |
| Red Hat Quay 3.1 | RedHat | quay/quay-rhel8:sha256:b54b571ac2f245f1a2eb1c7cf0dff6bc24ca6b9706ab8ee2dca323d561238255 | * |
| Red Hat Quay 3.12 | RedHat | quay/quay-rhel8:sha256:117876c6c6a12beb25983da60c8c1628f350a1797888b9f03c44b9dd737844fa | * |
| Red Hat Quay 3.15 | RedHat | quay/quay-rhel8:sha256:7bfb851938e312f47598891ba9f0d7b17e6657090e0204d37d5676313b33f134 | * |
| Red Hat Quay 3.16 | RedHat | quay/quay-rhel9:sha256:9f58fc80db29fa44684c6e39bb2eda06e86ba34801d5e04468941ac8d0b754eb | * |
| Node-qs | Ubuntu | plucky | * |
| Node-qs | Ubuntu | upstream | * |
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.