llamaCVEVulnerability Intelligence
/
Mongoose

CVE-2026-125120

Mongoose query injection bypasses sanitizeFilter in countDocuments

A remote, unauthenticated attacker can inject query operators so counts include records that should not match.

UnclearParche disponiblequery injection
Descargar PNG JSON
CVSS 3.1
9.8
Crítica
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Fuente: CNA
ExplotaciónSin evidenciaSSVC: none · no figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche4 versionesPrimer parche a -91 d de la divulgación
Exposición9 dDesde la divulgación, 9 nov 2026, 5:36 p. m.
Detección4 minDesde la divulgación hasta su ingreso al índice
Decisión SSVCSeguir de cerca
Monitorear y programar la remediación
Sin explotación conocida, no automatizable e impacto técnico total. Hay versiones corregidas disponibles.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Evaluación SSVC +1
Explotación
Remediación
Parche 6.13.11 +3
Monitoreo
Detectada
Fuente: OSV
Fuente: NIST NVD
Verificada
10 ago 26
9 nov 26
10 nov 26
12 nov 26
13 nov 26
16 nov 26
19 nov 26
10 ago 26
5 sept 26
30 sept 26
25 oct 26
19 nov 26
FechaFaseEventoDetalle
Remediación Parche 6.13.11 mongoose · -91 d desde divulgación
Remediación Parche 7.8.12 mongoose · -91 d desde divulgación
Remediación Parche 8.24.3 mongoose · -91 d desde divulgación
Remediación Parche 9.9.2 mongoose · -91 d desde divulgación
Divulgación Publicada CVE-2026-125120 divulgada · CVSS 9.8 (CNA)
Monitoreo Detectada Ingresó al índice
Monitoreo Fuente: OSV Registro visto por primera vez en OSV
Monitoreo Fuente: NIST NVD Registro visto por primera vez en NIST NVD
Divulgación Evaluación SSVC CISA-ADP · explotación ninguna
Divulgación Modificada Última actualización del registro
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Resumen generado por IA · CC-BY 4.0 · 9 nov 2026

Mongoose, a Node.js library for modeling MongoDB data, does not apply its sanitizeFilter defense to countDocuments(), so an attacker who can reach an affected application remotely, without logging in, can inject query operators that make the count include documents that should not match. This can undermine authorization or application logic that depends on that count.

Affects Mongoose before 6.13.11, 7.0.0 through 7.8.11, 8.0.0 through 8.24.2, and 9.0.0 through 9.9.1 in apps that rely on sanitizeFilter with countDocuments(). Fixed in 6.13.11, 7.8.12, 8.24.3, and 9.9.2.

¿Qué significa?Query operator objects in attacker-controlled filters are processed as operators, so countDocuments() can count documents that should not match. This can undermine authorization or application logic that depends on the count.
¿Quién está afectado?Affected versions are Mongoose before 6.13.11, 7.0.0 through 7.8.11, 8.0.0 through 8.24.2, and 9.0.0 through 9.9.1. The setup is an application that relies on sanitizeFilter and passes filter values to countDocuments(), where sanitizeFilter was not applied in older versions. Check the installed version with npm ls mongoose and review where countDocuments() receives filter values.
¿Qué hacer?Upgrade to the fixed version on the same major line: 6.13.11, 7.8.12, 8.24.3, or 9.9.2.
Descripción original del registro (GitHub_M)

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Prior to 6.13.11, 7.8.12, 8.24.3, and 9.9.2, Mongoose countDocuments() does not apply the configured sanitizeFilter query selector injection defense. An application that enables sanitizeFilter and passes attacker-controlled filter values to countDocuments() can therefore process query operator objects as operators rather than literal values, causing the count to include documents that should not match and potentially undermining authorization or application logic based on that count. This issue is fixed in versions 6.13.11, 7.8.12, 8.24.3, and 9.9.2.

Contexto

Condiciones y alcance

Condiciones necesarias para que el fallo sea explotable
01
Mongoose versions before 6.13.11, 7.0.0 through 7.8.11, 8.0.0 through 8.24.2, or 9.0.0 through 9.9.1 (affected ranges)“<6.13.11 || 7.0.0 - 7.8.11 || 8.0.0 - 8.24.2 || 9.0.0 - 9.9.1”
02
Application relies on sanitizeFilter and passes filter values to countDocuments(), where sanitizeFilter was not applied in older versions“In older versions of Mongoose, sanitizeFilter was not applied for countDocuments() queries.”
¿Quién debe revisar?Teams running Mongoose with sanitizeFilter enabled in a Node.js service that passes attacker-controlled filter values to countDocuments()
Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · CNA
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
mongoose< 6.13.11
mongoose≥ 7.0.0 < 7.8.12
mongoose≥ 8.0.0 < 8.24.3
mongoose≥ 9.0.0 < 9.9.2
6.13.11
7.0.0
7.8.12
8.0.0
8.24.3
9.0.0
9.9.2
9.12.2
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmmongoose
Corregida 6.13.11, 7.8.12, 8.24.3, 9.9.2 -91 d · -91 d · -91 d · -91 d 9.12.2 no afectada
Versiones corregidas6.13.117.8.128.24.39.9.2
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Fabricantehttps://github.com/Automattic/mongoose/security/advisories/GHSA-pcrw-h46h-c93h
Otrahttps://github.com/Automattic/mongoose/commit/7e912af3fac52cb0eea4cd71e24d65318916831a
Otrahttps://github.com/Automattic/mongoose/commit/8b10d5760bb181f5bf5d01495cde161c8aed0557
Otrahttps://github.com/Automattic/mongoose/commit/b1df045aab076b740fdaec14a15a44c694b85b7d
Otrahttps://github.com/Automattic/mongoose/commit/b5003d3915db1cf9209c38a4b93cf3a92cddd710
Otrahttps://github.com/Automattic/mongoose/releases/tag/6.13.11
Otrahttps://github.com/Automattic/mongoose/releases/tag/7.8.12
Otrahttps://github.com/Automattic/mongoose/releases/tag/8.24.3
Otrahttps://github.com/Automattic/mongoose/releases/tag/9.9.2

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.