qs's arrayLimit bypass in its bracket notation allows DoS via memory exhaustion
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[]=value consumes 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 advisory's "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.
Affected Packages
| Ecosystem | Package | Vulnerable Versions | Patched Version |
|---|---|---|---|
| npm |
qs
|
< 6.14.1 |
6.14.1
|
chore(deps): bump the minor-and-patch group across 1 directory with 25 updates
Open about 9 hours agochore(deps): bump the production-dependencies group with 6 updates
Open 3 months agoBump @nestjs/common from 10.2.5 to 10.4.22
Closed 5 months agochore(deps-dev): bump the dev-dependencies group across 1 directory with 3 updates
Open 5 months agobuild(deps): bump lexical from 0.34.0 to 0.42.0 in /frontend
Open 5 months agonpm(deps): bump @lexical/mark from 0.35.0 to 0.42.0
Open 5 months agonpm(deps): bump @lexical/selection from 0.35.0 to 0.42.0
Open 5 months agochore(deps): bump @nestjs/platform-express from 10.4.20 to 10.4.22
Open 5 months agoBump the deps group with 18 updates
Closed 6 months agochore(deps): bump @lexical/list from 0.41.0 to 0.42.0
Closed 6 months agochore(deps): bump @lexical/react from 0.41.0 to 0.42.0
Closed 6 months agodeps(deps): bump the dependencies group across 1 directory with 35 updates
Closed 6 months agochore(deps): bump the weekly-all group across 1 directory with 26 updates
Closed 6 months agochore(deps): bump @lexical/list from 0.38.2 to 0.42.0 in /web
Open 6 months agochore(deps): bump @lexical/utils from 0.38.2 to 0.42.0 in /web
Open 6 months agochore: bump @lexical/react from 0.27.2 to 0.42.0
Open 6 months agochore: bump lexical from 0.27.2 to 0.42.0 in /apps/webapp
Open 6 months agochore(deps): bump lexical from 0.17.0 to 0.42.0
Closed 6 months agochore(deps): Bump lexical from 0.35.0 to 0.42.0
Closed 6 months agochore(deps): Bump @lexical/list from 0.35.0 to 0.42.0
Closed 6 months agochore(deps): bump twilio from 5.10.7 to 5.12.2
Open 6 months agochore(deps): bump the dependencies group across 1 directory with 23 updates
Open 7 months agodeps(deps): bump the dependencies group across 1 directory with 27 updates
Closed 7 months agochore(deps): bump the npm_and_yarn group across 2 directories with 22 updates
Closed 7 months agochore(deps): bump the npm_and_yarn group across 2 directories with 23 updates
Closed 7 months agochore(deps): bump the npm_and_yarn group across 2 directories with 22 updates
Closed 7 months agoBump twilio from 3.64.0 to 5.12.2
Closed 7 months agoBump qs, @nestjs/platform-express and express
Closed 7 months agochore(deps): bump qs and @nestjs/platform-express
Open 7 months agoBump axios and twilio in /townService
Open 7 months agochore(backend)(deps): bump twilio from 5.11.2 to 5.12.1 in /backend
Open 7 months agochore(deps): bump the dependencies group across 1 directory with 10 updates
Open 7 months agochore(deps): bump @nestjs/platform-express from 10.4.20 to 10.4.22
Open 7 months agochore(deps): bump @nestjs/common from 10.4.20 to 10.4.22
Open 7 months agochore(deps): bump twilio from 5.11.2 to 5.12.0 in /server
Open 7 months agochore(deps): bump the production-dependencies group across 1 directory with 64 updates
Open 7 months agochore(deps): bump the nestjs group with 4 updates
Open 8 months agochore(deps): bump the dependencies group across 1 directory with 21 updates
Closed 8 months agochore(deps): bump the production-dependencies group across 1 directory with 63 updates
Open 8 months agochore(deps): bump the minor-and-patch group with 16 updates
Closed 8 months agobuild(deps): bump twilio from 5.10.7 to 5.12.0
Open 8 months agochore(deps): bump the production-dependencies group with 9 updates
Open 8 months agochore(deps): bump the production-dependencies group in /backend with 9 updates
Open 8 months agobuild(deps): bump multer and @nestjs/platform-express
Closed 8 months agodeps(deps): bump twilio from 5.7.1 to 5.12.0
Open 8 months agochore(backend)(deps): update @nestjs/core requirement from ^10.2.10 to ^10.4.22 in /backend
Open 8 months agoBump twilio from 3.64.0 to 5.12.0
Closed 8 months agoBump qs and @nestjs/platform-express
Closed 8 months agochore(deps): bump @nestjs/common from 10.4.20 to 10.4.22
Open 8 months agochore(deps): bump the production-dependencies group with 21 updates
Closed 8 months agoActions
Advisory Details
| Published: | December 30, 2025 9 months ago |
| Updated: | September 16, 2026 about 10 hours ago |
| CVSS Score: | 6.3 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L |
| EPSS: | 0.46% 39th percentile |
| Source: | Github |
| Classification: | GENERAL |
| UUID: | GSA_kwCzR0hTQS02cnc3LXZweG0tNDk4cM4ABQaB |