All vulnerabilities

npm

CVE-2026-110910

qs.stringify with allowEmptyArrays does not encode the keys of empty arrays, allowing query string parameter injection

Severity
Low 3.7
Published
27 Oct 2026
Last changed
4 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
6.12.6, 6.13.4, 6.14.3, 6.15.4, 6.16.2
Exploit chance
0.4% in the next 30 daysHigher than 29% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Improper output encoding (CWE-116)
Attack
Over the network · Only under certain conditions · No login needed · No user action needed
Attacker can
Change some data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Sources
CVE Program

Description

qs.stringify with allowEmptyArrays: true writes the key of an empty array without encoding it, even though keys are encoded by default. A key that contains & (or the configured delimiter), =, or # therefore becomes query string syntax instead of data, so a caller-supplied key name can add parameters to the serialized query string, or cut it short.

In lib/stringify.js, the allowEmptyArrays branch returns adjustedPrefix + '[]' early, before the code that passes every other key through encoder and formatter. So { "x&k=v": ["1"] } serializes as x%26k%3Dv%5B0%5D=1, but { "x&k=v": [] } serializes as x&k=v[]. The early return applies at any depth ({ "a": { "b&k=v": [] } } gives a[b&k=v][]), under every arrayFormat, with allowDots, and with a custom encoder, which is never called for that key. With encode: false or encodeValuesOnly: true, keys are intentionally left unencoded on every path; those configurations are not affected.

From the CVE Program. Shortened; the full text is there.

Affected software

SoftwareAffected versions
qsnpm · osv:npm:qs
  • From 6.12.0 before 6.12.6
  • From 6.13.0 before 6.13.4
  • From 6.14.0 before 6.14.3
  • From 6.15.0 before 6.15.4
  • From 6.16.0 before 6.16.2

About qs

Weekly downloads (npm)
277,610,363npm, 22 Nov 2026

References

  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-110910