{"vuln_id":"GHSA-2hjf-7455-w946","aliases":["CVE-2026-104199"],"description":"aMQTT: Inefficient Regular Expression Complexity and Uncontrolled Resource Consumption and Improper Input Validation","published_at":"2026-11-20T14:43:41Z","modified_at":"2026-11-20T15:00:07.980281Z","first_seen_at":"2026-11-21T19:15:19.285357Z","severity":"high","severity_source":"ghsa","cvss_score":8.7,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cwe":["CWE-20","CWE-400","CWE-1333"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-2hjf-7455-w946"},"matched_alias":null,"items":[{"id":10663,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-2hjf-7455-w946: aMQTT: Inefficient Regular Expression Complexity and Uncontrolled Resource Consumption and Improper Input Validation","summary":"aMQTT: Inefficient Regular Expression Complexity and Uncontrolled Resource Consumption and Improper Input Validation\n\n### Impact\n\n`amqtt` is vulnerable to a remote denial of service caused by improper MQTT topic-filter validation combined with catastrophic regular-expression backtracking.\n\nA single client can freeze the entire broker by sending one specially crafted `SUBSCRIBE` packet followed by one `PUBLISH` packet.\n\nThe vulnerability is caused by two defects:\n\n1. `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.\n2. `_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.\n\nTopic 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.\n\nThe issue was reproduced using a single raw MQTT 3.1.1 TCP connection with no third-party client dependencies.\n\nSuccessful exploitation causes:\n\n- Existing message delivery to stop\n- New MQTT connections to receive no `CONNACK`\n- Keepalive processing to stop\n- Broadcast processing to stop\n- The broker to remain unavailable until the process is restarted\n\nUnder the default configuration, anonymous clients can exploit the vulnerability without credentials. When authentication is enabled, any authenticated client permitted to create arbitrary subscriptions and publish messages may still exploit it. Authentication alone is therefore not a sufficient mitigation.\n\n- Ecosystem: `pip`\n- Package: `amqtt`\n- Affected versions: `>= 0.11.0, <= 0.11.3`\n\nThe vulnerable code is present in the `v0.11.0` release commit, `352678c87e50e501a8a5bb91fab73c9400fa046c`, and remained present on the main branch as of `eeb1e254da9a1e8d9cc68ae754fcedac652e8fc0`. Versions before 0.11.0 were not evaluated.\n\nThis is a denial-of-service vulnerability only. `re.escape()` prevents arbitrary regular-expression injection, and there is no known path to remote code execution.\n\nNo confidentiality or integrity impact has been identified. Successful exploitation causes a complete loss of availability for the affected broker process.\n\n### Patches\n\nThe issue has been patched in the `v0.11.4` released version; all users should upgrade.\n\nThe completed fix:\n\n- Validate topic filters one level at a time\n- Require any level containing `+` to be exactly `+`\n- As part of comprehensive MQTT topic-filter validation, require `#` to occupy an entire level and appear only as the final level\n- Replace the regular-expression matcher with deterministic, level-by-level MQTT topic matching\n\nSimply changi\n\nAffected: PyPI:amqtt\n\nFixed in: 0.11.4\n\nReferences:\nhttps://github.com/Yakifo/amqtt/security/advisories/GHSA-2hjf-7455-w946\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-104199\nhttps://github.com/Yakifo/amqtt/pull/361\nhttps://github.com/Yakifo/amqtt/commit/e48a8a65027667f936d415db7f01d3ac350104e0\nhttps://github.com/Yakifo/amqtt\nhttps://github.com/Yakifo/amqtt/releases/tag/v0.11.4","url":"https://osv.dev/vulnerability/GHSA-2hjf-7455-w946","published_at":"2026-11-20T14:43:41Z","updated_at":"2026-11-20T15:00:07.980281Z","fetched_at":"2026-11-21T19:15:55.946086Z","severity":"high","cvss_score":8.7,"epss":0.00659,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"amqtt","vuln_id":"CVE-2026-104199","vuln_ids":["CVE-2026-104199","GHSA-2HJF-7455-W946"],"tags":["osv","pypi","fix-available"],"cluster_id":2038,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10663","html":"https://vulnwatch.ve1ve2.com/item/10663"}},{"id":2310,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-2hjf-7455-w946 / CVE-2026-104199: aMQTT: Inefficient Regular Expression Complexity and Uncontrolled Resource Consumption and Improper Input Validation","summary":"aMQTT: Inefficient Regular Expression Complexity and Uncontrolled Resource Consumption and Improper Input Validation\n\n### Impact\n\n`amqtt` is vulnerable to a remote denial of service caused by improper MQTT topic-filter validation combined with catastrophic regular-expression backtracking.\n\nA single client can freeze the entire broker by sending one specially crafted `SUBSCRIBE` packet followed by one `PUBLISH` packet.\n\nThe vulnerability is caused by two defects:\n\n1. `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.\n2. `_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.\n\nTopic 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.\n\nThe issue was reproduced using a single raw MQTT 3.1.1 TCP connection with no third-party client dependencies.\n\nSuccessful exploitation causes:\n\n- Existing message delivery to stop\n- New MQTT connections to receive no `CONNACK`\n- Keepalive processing to stop\n- Broadcast processing to stop\n- The broker to remain unavailable until the process is restarted\n\nUnder the default configuration, anonymous clients can exploit the vulnerability without credentials. When authentication is enabled, any authenticated client permitted to create arbitrary subscriptions and publish messages may still exploit it. Authentication alone is therefore not a sufficient mitigation.\n\n- Ecosystem: `pip`\n- Package: `amqtt`\n- Affected versions: `>= 0.11.0, <= 0.11.3`\n\nThe vulnerable code is present in the `v0.11.0` release commit, `352678c87e50e501a8a5bb91fab73c9400fa046c`, and remained present on the main branch as of `eeb1e254da9a1e8d9cc68ae754fcedac652e8fc0`. Versions before 0.11.0 were not evaluated.\n\nThis is a denial-of-service vulnerability only. `re.escape()` prevents arbitrary regular-expression injection, and there is no known path to remote code execution.\n\nNo confidentiality or integrity impact has been identified. Successful exploitation causes a complete loss of availability for the affected broker process.\n\n### Patches\n\nThe issue has been patched in the `v0.11.4` released version; all users should upgrade.\n\nThe completed fix:\n\n- Validate topic filters one level at a time\n- Require any level containing `+` to be exactly `+`\n- As part of comprehensive MQTT topic-filter validation, require `#` to occupy an entire level and appear only as the final level\n- Replace the regular-expression matcher with deterministic, level-by-level MQTT topic matching\n\nSimply changi\n\nAffected packages: pip:amqtt\nPatched: amqtt 0.11.4","url":"https://github.com/advisories/GHSA-2hjf-7455-w946","published_at":"2026-11-20T14:43:41Z","updated_at":"2026-11-20T14:43:42Z","fetched_at":"2026-11-21T19:15:18.416740Z","severity":"high","cvss_score":8.7,"epss":0.00659,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"amqtt","vuln_id":"CVE-2026-104199","vuln_ids":["CVE-2026-104199","GHSA-2HJF-7455-W946"],"tags":["ghsa","pip","CWE-20","CWE-400","CWE-1333"],"cluster_id":2038,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2310","html":"https://vulnwatch.ve1ve2.com/item/2310"}},{"id":9097,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-104199: aMQTT is an open source MQTT broker and client. From 0.11.0 until 0.11.4, add_subscription() in amqtt/broker.py accepts malformed single-level + wildcard place…","summary":"aMQTT is an open source MQTT broker and client. From 0.11.0 until 0.11.4, add_subscription() in amqtt/broker.py accepts malformed single-level + wildcard placement because it checks substrings instead of validating each slash-delimited level. The _matches() function converts each + into a greedy regular-expression fragment and evaluates it with re.fullmatch(), allowing a filter containing many adjacent + characters to trigger catastrophic backtracking when compared with a topic that partially matches but ultimately fails. Because matching runs synchronously in _run_broadcast(), one subscription followed by a publish can block the broker event loop, stopping message delivery and new connection processing until restart. Anonymous clients can trigger the issue with the default configuration. Any authenticated client permitted to create arbitrary subscriptions and publish messages may still exploit it when authentication is enabled. This issue is fixed in version 0.11.4.\n\nReferences:\nhttps://github.com/Yakifo/amqtt/commit/e48a8a65027667f936d415db7f01d3ac350104e0\nhttps://github.com/Yakifo/amqtt/pull/361\nhttps://github.com/Yakifo/amqtt/releases/tag/v0.11.4\nhttps://github.com/Yakifo/amqtt/security/advisories/GHSA-2hjf-7455-w946","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-104199","published_at":"2026-11-19T20:17:14.180000Z","updated_at":"2026-11-19T20:17:14.180000Z","fetched_at":"2026-11-21T19:15:31.484738Z","severity":"high","cvss_score":8.7,"epss":0.00659,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-104199","vuln_ids":["CVE-2026-104199","GHSA-2HJF-7455-W946"],"tags":["CWE-20","CWE-400","CWE-1333"],"cluster_id":2039,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/9097","html":"https://vulnwatch.ve1ve2.com/item/9097"}}]}