- Severity: HIGH
- CVE: CVE-2026-104199
- Ecosystems: pip
- Packages: amqtt
### Impact
`amqtt` is vulnerable to a remote denial of service caused by improper MQTT topic-filter validation combined with catastrophic regular-expression backtracking.
A single client can freeze the entire broker by sending one specially crafted `SUBSCRIBE` packet followed by one `PUBLISH` packet.
The vulnerability is caused by two defects:
1. `add_subscription()` validates the placement of the single-level wildcard `+` using substring checks for `/+` and `+/`, rather than verifying that each `/`-delimited level containing `+` is exactly `+`. This allows malformed filters such as `”+/” + “+” * 60` to be accepted instead of rejected with return code `0x80`, as required by MQTT-4.7.1-3.
2. `_matches()` converts every `+` character into the greedy regular-expression fragment `[^/]*` and evaluates the resulting expression with `re.fullmatch()`. A filter containing many adjacent `+` characters can cause catastrophic backtracking when matched against a topic that partially matches but ultimately fails.
Topic matching runs synchronously inside the broker’s global broadcast loop. When the malicious match is evaluated, it blocks the asyncio event loop and prevents the broker from processing any other work.
The issue was reproduced using a single raw MQTT 3.1.1 TCP connection with no third-party client dependencies.
Successful exploitation causes:
– Existing message delivery to stop
– New MQTT connections to receive no `CONNACK`
– Keepalive processing to stop
– Broadcast pro…
Source: GitHub Security Advisories · 2026-11-20