All vulnerabilities

npm

CVE-2026-8723

qs has a remotely triggerable DoS: qs.stringify crashes with TypeError on null/undefined entries in comma-format arrays when encodeValuesOnly is set

Severity
Medium 5.3
Published
22 May 2026
Last changed
10 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
6.15.2
Exploit chance
0.4% in the next 30 daysHigher than 34% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Null pointer dereference (CWE-476)
Attack
Over the network · No login needed · No user action needed
Attacker can
Slow it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Also known as
GHSA-q8mj-m7cp-5q26
Sources
OSV.dev and GitHub

Description

qs.stringify throws TypeError when called with arrayFormat: 'comma' and encodeValuesOnly: true on an array containing null or undefined. The throw is synchronous and not handled by any of qs's null-related options (skipNulls, strictNullHandling).

In the comma + encodeValuesOnly branch, lib/stringify.js:145 mapped the array through the raw encoder before joining:

utils.encode (lib/utils.js:195) reads str.length with no null guard, so a null or undefined element throws TypeError. skipNulls and strictNullHandling are both checked in the per-element loop below this line and never get a chance to run.

Same class of bug as the filter-array path fixed in 0c180a4. The vulnerable shape of the comma + encodeValuesOnly branch was introduced in 4c4b23d ("encode comma values more consistently", PR #463, 2023-01-19), first released in v6.11.1.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
qsnpm · osv:npm:qs
  • From 6.11.1 before 6.15.2

About qs

Weekly downloads (npm)
262,943,056npm, 15 Nov 2026

References