PT-2026-83506 · Npm · Qs
CVSS v4.0
6.3
Medium
| Vector | AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
Name of the Vulnerable Software and Affected Versions
qs versions 6.14.2 through 6.15.3
Description
When the
qs.parse function is used with the comma and throwOnLimitExceeded options set to true, a comma-separated value assigned to a bracket-push key (e.g., a[]=1,2,3,4) is split into an array without being validated against the arrayLimit. In contrast, the same value assigned to flat, indexed, nested, or dotted keys correctly triggers a RangeError. This occurs because the arrayLimit check in lib/parse.js was applied after the value was wrapped as a nested element, and a subsequent attempt to fix this using an isFlatArrayValue flag failed to account for the []= key form. An unauthenticated attacker can exploit this by providing a single a[]= parameter to bypass configured limits and force the parser to allocate an array proportional to the request size, potentially leading to excessive memory consumption.Recommendations
Update qs to version 6.16.0.
As a temporary workaround, avoid using the
[]= key form in query strings when comma and throwOnLimitExceeded are enabled.Exploit
Fix
Allocation of Resources Without Limits
RCE
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Qs