fix(deps): update dependency qs to ^6.14.1 [security] #133
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^6.14.0→^6.14.1GitHub Vulnerability Alerts
CVE-2025-15284
Summary
The
arrayLimitoption in qs does not enforce limits for bracket notation (a[]=1&a[]=2), allowing attackers to cause denial-of-service via memory exhaustion. Applications usingarrayLimitfor DoS protection are vulnerable.Details
The
arrayLimitoption only checks limits for indexed notation (a[0]=1&a[1]=2) but completely bypasses it for bracket notation (a[]=1&a[]=2).Vulnerable code (
lib/parse.js:159-162):Working code (
lib/parse.js:175):The bracket notation handler at line 159 uses
utils.combine([], leaf)without validating againstoptions.arrayLimit, while indexed notation at line 175 checksindex <= options.arrayLimitbefore creating arrays.PoC
Test 1 - Basic bypass:
Test 2 - DoS demonstration:
Configuration:
arrayLimit: 5(test 1) orarrayLimit: 100(test 2)a[]=value(not indexeda[0]=value)Impact
Denial of Service via memory exhaustion. Affects applications using
qs.parse()with user-controlled input andarrayLimitfor protection.Attack scenario:
GET /api/search?filters[]=x&filters[]=x&...&filters[]=x(100,000+ times)qs.parse(query, { arrayLimit: 100 })Real-world impact:
Suggested Fix
Add
arrayLimitvalidation to the bracket notation handler. The code already calculatescurrentArrayLengthat line 147-151, but it's not used in the bracket notation handler at line 159.Current code (
lib/parse.js:159-162):Fixed code:
This makes bracket notation behaviour consistent with indexed notation, enforcing
arrayLimitand converting to object when limit is exceeded (per README documentation).qs's arrayLimit bypass in its bracket notation allows DoS via memory exhaustion
CVE-2025-15284 / GHSA-6rw7-vpxm-498p
More information
Details
Summary
The
arrayLimitoption in qs does not enforce limits for bracket notation (a[]=1&a[]=2), allowing attackers to cause denial-of-service via memory exhaustion. Applications usingarrayLimitfor DoS protection are vulnerable.Details
The
arrayLimitoption only checks limits for indexed notation (a[0]=1&a[1]=2) but completely bypasses it for bracket notation (a[]=1&a[]=2).Vulnerable code (
lib/parse.js:159-162):Working code (
lib/parse.js:175):The bracket notation handler at line 159 uses
utils.combine([], leaf)without validating againstoptions.arrayLimit, while indexed notation at line 175 checksindex <= options.arrayLimitbefore creating arrays.PoC
Test 1 - Basic bypass:
Test 2 - DoS demonstration:
Configuration:
arrayLimit: 5(test 1) orarrayLimit: 100(test 2)a[]=value(not indexeda[0]=value)Impact
Denial of Service via memory exhaustion. Affects applications using
qs.parse()with user-controlled input andarrayLimitfor protection.Attack scenario:
GET /api/search?filters[]=x&filters[]=x&...&filters[]=x(100,000+ times)qs.parse(query, { arrayLimit: 100 })Real-world impact:
Suggested Fix
Add
arrayLimitvalidation to the bracket notation handler. The code already calculatescurrentArrayLengthat line 147-151, but it's not used in the bracket notation handler at line 159.Current code (
lib/parse.js:159-162):Fixed code:
This makes bracket notation behaviour consistent with indexed notation, enforcing
arrayLimitand converting to object when limit is exceeded (per README documentation).Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
ljharb/qs (qs)
v6.14.1Compare Source
[]notation as wellparse: when a custom decoder returnsnullfor a key, ignore that keyparse: extract key segment splitting helperstringify: increase coverageeslint,@ljharb/eslint-config,npmignore,es-value-fixtures,for-each,object-inspectConfiguration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.