CVE-2026-8723: qs Package Suffers from TypeError DoS on Null/Undefined Entries
Summary
CVE-2026-8723: qs.stringify throws TypeError when called with arrayFormat: 'comma' and encodeValuesOnly: true on an array containing null or undefined. Affects qs versions >= 6.11.1, < 6.15.2. Fixed in 6.15.2. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The 'qs' package is a widely used library in the Node.js ecosystem for parsing and stringifying query strings. It provides a flexible API for handling complex query string formats, including support for arrays and nested objects. However, a recent vulnerability has been identified that affects its functionality when specific options are used, potentially leading to application crashes.
Vulnerability Detail
The vulnerability arises from the 'qs.stringify' method, which throws a TypeError when called with 'arrayFormat: comma' and 'encodeValuesOnly: true' on arrays containing null or undefined values. This synchronous error is not managed by any of the library's null-related options, leading to potential Denial of Service (DoS) conditions in applications that rely on this functionality. The issue was introduced in version 6.11.1 and affects all versions up to 6.15.1.
How To Fix
Latest published version: 6.16.1 as of 22 Oct 2026
npm install qs@6.16.1
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
6.15.2
This is the first release that contains the fix.
npm install qs@6.15.2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If you cannot update the package immediately, you can implement a workaround by ensuring that any arrays passed to 'qs.stringify' do not contain null or undefined values. For example, you can filter the array before passing it to the stringify function:
const qs = require('qs');
const input = { a: [null, 'b'] };
const filteredInput = { a: input.a.filter(v => v != null) };
const queryString = qs.stringify(filteredInput, { arrayFormat: 'comma', encodeValuesOnly: true });
Conclusion
The 'qs' package has a vulnerability that can lead to a TypeError and potential Denial of Service conditions when specific options are used with null or undefined array entries. It is crucial to update to the patched version or implement workarounds to mitigate this issue.
See every vulnerability recorded for qs →
FAQ
The vulnerability is a TypeError that occurs when using the 'qs.stringify' method with specific options and input containing null or undefined values.
Versions from 6.11.1 to 6.15.1 are affected by this vulnerability.
You can use the Vulert platform to monitor and alert for vulnerabilities in your application. Visit Vulert Scanner to check if your application is affected without needing to sign up.
The CVSS score for this vulnerability is 5.3, indicating a moderate severity level.
You can implement a workaround by filtering out null or undefined values from the arrays before passing them to the 'qs.stringify' method.
References
Related vulnerabilities
Recent vulnerabilities recorded for qs.