llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · aedes

GHSA-P8R9-QF8W-P73R

Cross-session QoS2 dedup residue silently swallows the first colliding message after clean-session reconnect

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
6.5
Media
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición64 dDesde la divulgación, 16 sept 2026, 3:17 a. m.
Detección64 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Monitoreo
Detectada +1
16 sept 26
19 nov 26
20 nov 26
16 sept 26
2 oct 26
18 oct 26
4 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-P8R9-QF8W-P73R divulgada · CVSS 6.5 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Affects: aedes 1.1.1, and current main (verified identical code paths in v1.1.2), with aedes-persistence 10.3.1.

Reproduction: a client publishes a QoS2 message (e.g., msgId=7) and disconnects without completing the PUBREL exchange; the same clientId reconnects with cleanSession=1 and publishes QoS2 msgId=7 again. The broker returns a normal PUBREC but never delivers the message to subscribers. A fresh clientId with the same msgId is delivered normally.

Mechanism: `lib/handlers/publish.js:52-55` (dedup hit returns PUBREC without publishing), `lib/handlers/connect.js:175` (clean-session path only clears subscriptions), `aedes-persistence/asyncPersistence.js:277-306` (`#incoming` has no per-client cleanup entry point; its only deletion point is the PUBREL handler).

Specification: MQTT 3.1.1 [MQTT-3.1.2-6] requires the server to discard all session state when cleanSession=1; the dedup table escapes this cleanup while subscriptions are cleared, producing silent message loss with byte-identical PUBREC.

Suggested direction: clear `#incoming[clientId]` on the clean=1 connect path; this needs a per-client incoming-cleanup API in aedes-persistence.

---

Fix

Fixed in aedes 1.2.0 (commit `c7acaa1`). `aedes-persistence` gains `cleanIncoming(client)`, and aedes calls
it on the clean-session CONNECT path after `registerClient`, and again when a clean session's connection closes.

The fix is feature-detected, so it is only effective if your persistence implements `cleanIncoming`. aedes
skips the call when the method is absent rather than crashing, which means an un-upgraded persistence leaves you
exposed on aedes 1.2.0. As of this advisory:

| persistence | implements `cleanIncoming` |
|---|---|
| `aedes-persistence` (default, in-memory) 11.0.0 | yes |
| `aedes-persistence-mongodb` 9.5.0 | yes |
| `aedes-persistence-redis` 12.0.0 | yes — breaking, see its `UPGRADE.md` |
| `aedes-persistence-level` 9.1.3 | not yet |
| `aedes-persistence-sqlite` 2.0.0 | not yet |
| `aedes-cached-persistence` 10.1.1 | no — deprecated, superseded by `aedes-persistence` >= 10.2 |

Upgrade aedes to `^1.2.0` and `aedes-persistence` to `^11.0.0`; if you use one of the stores above that does
not yet implement it, you remain affected until it ships.

The `2.0.0-beta` line is still affected — `2.0.0-beta.0` and `2.0.0-beta.1` are published under the `beta`
dist-tag and carry neither fix. There is no patched 2.x release yet.

Impact in practice

Silent message loss, not a crash: the broker answers a byte-identical PUBREC and drops the message. Nothing is
logged, so it surfaces as an application-level "message never arrived" rather than as a broker fault.

Vector CVSS 3.1

Desglose de métricas

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

Rangos afectados

Afectada Corregida Última
aedes≤ 1.1.3
aedes≥ 2.0.0-beta.0 ≤ 2.0.0-beta.1
1.1.3
1.2.0
2.0.0-beta.0
2.0.0-beta.1
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmaedes
Sin parche — — 1.2.0 no afectada
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/moscajs/aedes/security/advisories/GHSA-p8r9-qf8w-p73r

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