llamaCVEVulnerability Intelligence
/
Advisory · GitHub

GHSA-Q46V-HRVQ-HP24

Incomplete fix for CVE-2026-44838: `escape_regex_char/1` does not escape `-`, leaving room for an MQTT topic permission bypass

Sin parche publicado
Descargar PNG JSON
CVSS 4.0
5.1
Media
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:L/SI:H/SA:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición120 dDesde la divulgación, 22 jul 2026, 8:00 p. m.
Detección120 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Monitoreo
Detectada +1
23 jul 26
17 nov 26
20 nov 26
23 jul 26
22 ago 26
21 sept 26
21 oct 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-Q46V-HRVQ-HP24 divulgada · CVSS 5.1 (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

## Affected product
RabbitMQ — internal authorization backend + `rabbitmq_mqtt` plugin topic permissions

## Summary
The CVE-2026-44838 fix made `expand_topic_permission/2` escape regex metacharacters in expanded topic-permission variables (`escape_regex(V)`), but `escape_regex_char/1` escapes `\ ^ $ . | ? * + ( ) [ ] { }` and omits `-`. When a topic permission template places `{client_id}` inside a `[...]` character class (e.g. `^[{client_id}]-sensors$`), an MQTT client using `client_id = a-z` expands the regex to `^[a-z]-sensors$`, turning the class into a range and broadening topic authorization to `b-sensors`, `m-sensors`, etc. The repository's own OAuth2 scope-expansion code explicitly escapes `-` for exactly this reason.

## Affected code
- `deps/rabbit/src/rabbit_auth_backend_internal.erl` → `escape_regex_char/1` (no `$-`).
- `deps/rabbitmq_mqtt/src/rabbit_mqtt_processor.erl` → injects user-controlled `client_id` into the topic variable map; read and write checks share the same backend expansion.

## Steps to reproduce
Using the provided reproduction materials, With `set_topic_permissions ... '^[{client_id}]-sensors$'`:
- `mosquitto_pub -i 'a-z' -t 'b-sensors'` → PUBACK (bypass);
- `mosquitto_pub -i 'x' -t 'b-sensors'` → denied (control).

(Runtime-confirmed on official `rabbitmq:4.3.2-management`; a single benign placeholder message was published.)

## Impact
A low-privileged authenticated MQTT user controlling its `client_id` can broaden topic authorization (read and write) when templates embed `{client_id}` in a `[...]` class. Narrower than the original raw-regex injection (requires that template shape), but RabbitMQ supports regex topic permissions and its OAuth2 tests already treat this range class as security-relevant.

## Suggested remediation
Add `$-` to `escape_regex_char/1`, matching the OAuth2 implementation. Add a regression test (analogous to OAuth2 `crafted_value_cannot_form_range_inside_char_class`): `expand_topic_permission(<<"^[{client_id}]-sensors$">>, #{<<"client_id">> => <<"a-z">>})` should yield `<<"^[a\\-z]-sensors$">>`, and `b-sensors` must be denied.

## Credit
Reported as part of an incomplete-patch measurement study (responsible disclosure).

Vector CVSS 4.0

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
Requisitos de ataqueAT:P
NingunoPresentes
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaPasivaActiva
Confid. (sistema)VC:N
AltoBajoNinguno
Integridad (sistema)VI:N
AltoBajoNinguno
Disponib. (sistema)VA:N
AltoBajoNinguno
Confid. (posterior)SC:L
AltoBajoNinguno
Integridad (posterior)SI:H
AltoBajoNinguno
Disponib. (posterior)SA:N
AltoBajoNinguno
Remediación

Estado del parche por paquete

La fuente no informa paquetes ni versiones corregidas.

Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/rabbitmq/rabbitmq-server/security/advisories/GHSA-q46v-hrvq-hp24

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