All vulnerabilities

PyPI

CVE-2026-104199

aMQTT: Inefficient Regular Expression Complexity and Uncontrolled Resource Consumption and Improper Input Validation

Severity
High
Published
20 Nov 2026
Last changed
20 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
0.11.4
Exploit chance
0.7% in the next 30 daysHigher than 52% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Regular expression denial of service (ReDoS) (CWE-1333)Improper input validation (CWE-20)Uncontrolled resource consumption (CWE-400)
Also known as
GHSA-2hjf-7455-w946
Sources
OSV.dev and GitHub

Description

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:

  • 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.
  • _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.
From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

This is the temporary mitigation that was recommended prior to the patched release: administrators can install a topic-filtering plugin that rejects malformed wildcard subscriptions before they are added to the broker. Place the plugin in an importable Python module, enable it in the broker configuration, and restart the broker.

This workaround applies when subscription requests pass through the plugin. If the broker is configured to use a persistent session plugin, restarting the broker alone is not sufficient; any persisted sessions containing malformed topic filters need to be removed.

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
amqttPyPI · osv:PyPI:amqtt
  • From 0.11.0 before 0.11.4

About amqtt

Weekly downloads (PyPI)
24,808PyPI Stats, 23 Nov 2026

Vulnerabilities in amqtt

In our list
2
Published in the last 12 months
2
Critical, last 12 months
0
High, last 12 months
2
Known exploited
0
Search the list for amqtt

References