Mittel

qs's arrayLimit bypass in its bracket notation allows DoS via memory exhaustion

  • Veröffentlicht: 30.12.2025
  • Aktualisiert: 11.10.2026 10:22

Summary

The arrayLimit option in qs did not enforce limits for bracket notation (a[]=1&a[]=2), only for indexed notation (a[0]=1). This is a consistency bug; arrayLimit should apply uniformly across all array notations.

Note: The default parameterLimit of 1000 effectively mitigates the DoS scenario originally described. With default options, bracket notation cannot produce arrays larger than parameterLimit regardless of arrayLimit, because each a[]=value consumes one parameter slot. The severity has been reduced accordingly.

Details

The arrayLimit option only checked limits for indexed notation (a[0]=1&a[1]=2) but did not enforce it for bracket notation (a[]=1&a[]=2).

Vulnerable code (lib/parse.js:159-162):

js
if (root === '[]' && options.parseArrays) {
    obj = utils.combine([], leaf);  // No arrayLimit check
}

Working code (lib/parse.js:175):

js
else if (index <= options.arrayLimit) {  // Limit checked here
    obj = [];
    obj[index] = leaf;
}

The bracket notation handler at line 159 uses utils.combine([], leaf) without validating against options.arrayLimit, while indexed notation at line 175 checks index <= options.arrayLimit before creating arrays.

PoC

js
const qs = require('qs');
const result = qs.parse('a[]=1&a[]=2&a[]=3&a[]=4&a[]=5&a[]=6', { arrayLimit: 5 });
console.log(result.a.length);  // Output: 6 (should be max 5)

Note on parameterLimit interaction: The original advisory's "DoS demonstration" claimed a length of 10,000, but parameterLimit (default: 1000) caps parsing to 1,000 parameters. With default options, the actual output is 1,000, not 10,000.

Impact

Consistency bug in arrayLimit enforcement. With default parameterLimit, the practical DoS risk is negligible since parameterLimit already caps the total number of parsed parameters (and thus array elements from bracket notation). The risk increases only when parameterLimit is explicitly set to a very high value.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
npm-Paket qs < 6.14.1 6.14.1

Verweise

CVSS-Wert 3.7/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Schwäche (CWE)
CWE-20
Plattform
npm
Paket
qs
Veröffentlicht
30.12.2025
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-6rw7-vpxm-498p - CC BY 4.0

Schwachstellenhistorie: qs

Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (9) im Archiv
Einträge insgesamt
9
Erste → letzte
10.2017 09.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Hoch 4
  • Mittel 4
  • Niedrig 1

Veröffentlichungen pro Jahr

  1. 2017: 1
  2. 2018: 1
  3. 2019: 0
  4. 2020: 1
  5. 2021: 0
  6. 2022: 1
  7. 2023: 0
  8. 2024: 0
  9. 2025: 1
  10. 2026: 4
Schweregrad:
  1. qs's arrayLimit bypass in its bracket notation allows DoS via memory exhaustion dieser Eintrag
    Mittel · 3.7 CVE-2025-15284 < 6.14.1 6.14.1
  2. Hoch · 7.5 CVE-2022-24999 >= 6.10.0, < 6.10.3, >= 6.9.0, < 6.9.7, >= 6.8.0, < 6.8.3, >= 6.7.0, < 6.7.3, >= 6.6.0, < 6.6.1, >= 6.5.0, < 6.5.3, >= 6.4.0, < 6.4.1, >= 6.3.0, < 6.3.3, < 6.2.4 6.10.3, 6.9.7, 6.8.3, 6.7.3, 6.6.1, 6.5.3, 6.4.1, 6.3.3, 6.2.4
  3. Hoch · 7.5 CVE-2017-1000048 < 6.0.4, >= 6.1.0, < 6.1.2, >= 6.2.0, < 6.2.3, >= 6.3.0, < 6.3.2 6.0.4, 6.1.2, 6.2.3, 6.3.2
  4. Hoch CVE-2014-10064 < 1.0.0 1.0.0
  5. Hoch CVE-2014-7191 < 1.0.0 1.0.0

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.