CVE-2026-8723: Synchronous Denial of Service in qs npm Package via TypeError
Vulnerability ID: CVE-2026-8723
CVSS Score: 5.3
Published: 2026-05-22
The qs query string parsing and serialization library for Node.js is vulnerable to a synchronous Denial of Service (DoS) attack. The vulnerability manifests as a process-terminating TypeError when processing arrays with null or undefined elements under specific configuration parameters.
TL;DR
A configuration-dependent vulnerability in qs.stringify allows attackers to crash the hosting Node.js process by supplying arrays with null or undefined elements when comma formatting and encodeValuesOnly are enabled.
⚠️ Exploit Status: POC
Technical Details
- CWE ID: CWE-476
- Attack Vector: Network
- CVSS v3.1: 5.3
- EPSS Score: 0.00044
- Impact: Denial of Service (Process Termination)
- Exploit Status: poc
- KEV Status: Not Listed
Affected Systems
- Node.js applications
- Projects utilizing the qs npm package versions 6.11.1 through 6.15.1
-
qs: >= 6.11.1 < 6.15.2 (Fixed in:
6.15.2)
Code Analysis
Commit: 21f80b3
Fix: add null check in encoder mapping for comma-separated arrays
--- a/lib/stringify.js
+++ b/lib/stringify.js
@@ -142,7 +142,9 @@ var stringify = function stringify(
if (generateArrayPrefix === 'comma' && isArray(obj)) {
// we need to join elements in
if (encodeValuesOnly && encoder) {
- obj = utils.maybeMap(obj, encoder);
+ obj = utils.maybeMap(obj, function (v) {
+ return v == null ? v : encoder(v);
+ });
}
objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
Exploit Details
- Vendor Advisory: Public proof of concept exploiting the qs.stringify TypeError crash
Mitigation Strategies
- Upgrade the qs package to a patched version
- Modify application configuration to avoid vulnerable stringify options
- Implement defensive error handling around serialization logic
- Sanitize application state before passing data to serializers
Remediation Steps:
- Identify all projects in your environment utilizing the
qsnpm package. - Audit the codebase for usage of
qs.stringifywith options{ arrayFormat: 'comma', encodeValuesOnly: true }. - Update
package.jsondependencies to ensureqsis version6.15.2or higher. - Execute
npm installoryarn installto apply the updated dependency. - Deploy the updated application to target environments.
- If upgrade is impossible, wrap vulnerable
qs.stringifycalls in atry-catchblock.
References
Read the full report for CVE-2026-8723 on our website for more details including interactive diagrams and full exploit analysis.
Top comments (0)