CVE-2025-15284

Improper Input Validation vulnerability in qs (parse modules) allows HTTP DoS.This issue affects qs: < 6.14.1. 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[]=valueconsumes 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): if (root === '[]' && options.parseArrays) { obj = utils.combine([], leaf); // No arrayLimit check } Working code (lib/parse.js:175): 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 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.
Configurations

Configuration 1 (hide)

cpe:2.3:a:qs_project:qs:*:*:*:*:*:node.js:*:*

History

14 Oct 2026, 19:10

Type Values Removed Values Added
Summary
  • (es) Vulnerabilidad de validación de entrada incorrecta en qs (módulos de análisis) permite DoS HTTP. Este problema afecta a qs: < 6.14.1. Resumen La opción arrayLimit en qs no aplica límites para la notación de corchetes (a[]=1&a[]=2), permitiendo a los atacantes causar denegación de servicio mediante el agotamiento de la memoria. Las aplicaciones que utilizan arrayLimit para la protección contra DoS son vulnerables. Detalles La opción arrayLimit solo verifica los límites para la notación indexada (a[0]=1&a[1]=2) pero la omite completamente para la notación de corchetes (a[]=1&a[]=2). Código vulnerable (lib/parse.js:159-162): if (root === '[]' && options.parseArrays) { obj = utils.combine([], leaf); // Sin verificación de arrayLimit } Código funcional (lib/parse.js:175): else if (index <= options.arrayLimit) { // Límite verificado aquí obj = []; obj[index] = leaf; } El manejador de notación de corchetes en la línea 159 utiliza utils.combine([], leaf) sin validar contra options.arrayLimit, mientras que la notación indexada en la línea 175 verifica index <= options.arrayLimit antes de crear arreglos. PoC Prueba 1 - Omisión básica: npm install qs 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); // Salida: 6 (debería ser máximo 5) Prueba 2 - Demostración de DoS: const qs = require('qs'); const attack = 'a[]=' + Array(10000).fill('x').join('&a[]='); const result = qs.parse(attack, { arrayLimit: 100 }); console.log(result.a.length); // Salida: 10000 (debería ser máximo 100) Configuración: * arrayLimit: 5 (prueba 1) o arrayLimit: 100 (prueba 2) * Usar notación de corchetes: a[]=value (no indexada a[0]=value) Impacto Denegación de servicio mediante agotamiento de memoria. Afecta a las aplicaciones que utilizan qs.parse() con entrada controlada por el usuario y arrayLimit para protección. Escenario de ataque: * El atacante envía una solicitud HTTP: GET /api/search?filters[]=x&filters[]=x&...&filters[]=x (más de 100,000 veces) * La aplicación analiza con qs.parse(query, { arrayLimit: 100 }) * qs ignora el límite, analiza los 100,000 elementos en un arreglo * Memoria del servidor agotada ? la aplicación falla o deja de responder * Servicio no disponible para todos los usuarios Impacto en el mundo real: * Una única solicitud maliciosa puede colapsar el servidor * No se requiere autenticación * Fácil de automatizar y escalar * Afecta a cualquier endpoint que analice cadenas de consulta con notación de corchetes

Information

Published : 2025-12-29 23:15

Updated : 2026-10-14 19:10


NVD link : CVE-2025-15284

Mitre link : CVE-2025-15284

CVE.ORG link : CVE-2025-15284


JSON object : View

Products Affected

qs_project

  • qs
CWE
CWE-20

Improper Input Validation