CVE-2026-130176: aMQTT Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-wcqj-wx85-c75p
CVSS 7.5
CWE-772 CWE-401
Published
Advisory Summary

CVE-2026-130176 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-772: Missing Release of Resource after Effective Lifetime) affecting aMQTT libraries in the PyPI ecosystem. The issue involves denial of service (dos) via memory leak in unmanaged qos 2 session handshakes. Remediation is available by upgrading affected packages to version 0.12.1.

CVE-2026-130176 at a Glance

CVE Identifier CVE-2026-130176
GHSA Identifier GHSA-wcqj-wx85-c75p
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-772: Missing Release of Resource after Effective Lifetime
Affected Product aMQTT
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-130176

To remediate this vulnerability, upgrade all affected aMQTT dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

amqtt fixed: 0.12.1
pip install amqtt>=0.12.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show amqtt

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-130176, inspect your installed packages using pip:

pip show amqtt

Analyze the terminal output to locate any version of aMQTT in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.12.1), your application is affected.

Note: The pip show amqtt command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-772: Missing Release of Resource after Effective Lifetime, where the product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed. In aMQTT, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact `amqtt` is vulnerable to a remote denial of service caused by incomplete MQTT QoS 2 transactions remaining allocated after the associated client disconnects. MQTT QoS 2 uses a four-step handshake to provide exactly-once delivery. If a client begins a QoS 2 transaction but disconnects before the handshake completes, `amqtt` retains the associated transaction state and packet identifier without an expiration mechanism to remove it. QoS 1 transactions are protected by a timeout mechanism, which defaults to 5 seconds, allowing abandoned state to be released. Equivalent timeout handling was not applied to incomplete QoS 2 transactions. An attacker can repeatedly connect to the broker, initiate QoS 2 transactions, and disconnect before completing the handshake. Each incomplete transaction leaves state allocated in memory. Repeating this process causes broker memory consumption to grow continuously. Successful exploitation can cause: * Unbounded growth in broker memory usage * Accumulation of incomplete QoS 2 transaction state * Increasing memory pressure on the host system * Termination of the broker process when available memory is exhausted * Operating-system Out-Of-Memory (OOM) intervention * Complete loss of availability for the affected broker process Exploitation does not require maintaining long-lived connections. An attacker can create incomplete QoS 2 transactions and disconnect, leaving the broker to retain the associated state after the network connection has closed. Under the default configuration, anonymous clients can exploit the vulnerability without credentials. When authentication is enabled, any authenticated client permitted to initiate QoS 2 message flows may still be able to exploit it. Authentication alone is therefore not a sufficient mitigation. * Ecosystem: `pip` * Package: `amqtt` * Affected versions: `>= 0.11.0, <= 0.12.0` The vulnerable code is present in the v0.11.0 release commit, 352678c87e50e501a8a5bb91fab73c9400fa046c, and remained present on the main branch as of 5ebbf366f6b79ab12a06f426ffd18ff28954e4ea. Versions before 0.11.0 were not evaluated. This is a denial-of-service vulnerability only. No confidentiality or integrity impact has been identified. Successful exploitation causes degradation and eventual loss of availability through memory exhaustion. ### Patches The issue will be been patched in the `v0.12.1` released version; all users should upgrade. The completed fix: * Apply transaction expiration handling consistently to incomplete QoS 1 and QoS 2 message flows * Expire abandoned QoS 2 state when the associated transaction does not complete within the configured timeout * Release the associated message state and packet identifiers when the transaction expires * Prevent disconnected clients from leaving incomplete QoS 2 transactions resident in broker memory indefinitely The fixing commit is [`2755fd801a6f95e9b73e11116948b57a95348466`](https://github.com/Yakifo/amqtt/commit/2755fd801a6f95e9b73e11116948b57a95348466) ### Workarounds Administrators who cannot immediately upgrade should limit the ability of untrusted clients to create large numbers of incomplete QoS 2 transactions. Where application requirements permit, preventing untrusted clients from using QoS 2 provides the strongest temporary mitigation. Connection and request rate limiting at a reverse proxy, load balancer, firewall, or other network layer can reduce the rate at which an attacker creates abandoned transactions, but does not eliminate the underlying vulnerability. An attacker able to continue creating incomplete QoS 2 transactions can still cause memory usage to increase over time. Administrators should also monitor broker memory consumption and configure appropriate process or container memory limits to prevent exhaustion of host resources. Restarting the broker may reclaim abandoned state and restore availability, but the broker remains vulnerable until the patched version is installed. MQTT Keep Alive limits are not a sufficient mitigation because the vulnerable state persists after the client connection has already terminated.

CVE-2026-130176 Affected aMQTT Versions

1 component(s)
Fixed Versions:
0.12.1
Product / Package Ecosystem Affected Versions Fixed Version
amqtt
PyPI
≥ 0.11.0
< 0.12.1
0.12.1

References

Frequently Asked Questions

What is CVE-2026-130176?
CVE-2026-130176 is a security vulnerability in aMQTT involving Denial of Service (DoS) via Memory Leak in Unmanaged QoS 2 Session Handshakes under CWE-772: Missing Release of Resource after Effective Lifetime.
Which aMQTT versions are affected?
Affected versions include releases prior to 0.12.1 across affected packages: amqtt.
What version fixes CVE-2026-130176?
Upgrading to 0.12.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is amqtt affected?
Yes, amqtt is affected in releases prior to 0.12.1. Upgrade your dependency to 0.12.1 or later.
What is the CVSS score of CVE-2026-130176?
CVE-2026-130176 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-130176?
CVE-2026-130176 is classified under CWE-772: Missing Release of Resource after Effective Lifetime (The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.).
How can I check PyPI dependencies for CVE-2026-130176?
Run the dependency tree command: 'pip show amqtt'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wcqj-wx85-c75p",
  "modified" : "2026-11-20T14:54:51Z",
  "published" : "2026-11-20T14:54:50Z",
  "aliases" : [ "CVE-2026-130176" ],
  "summary" : "aMQTT: Denial of Service (DoS) via Memory Leak in Unmanaged QoS 2 Session Handshakes",
  "details" : "### Impact\n\n`amqtt` is vulnerable to a remote denial of service caused by incomplete MQTT QoS 2 transactions remaining allocated after the associated client disconnects.\n\nMQTT QoS 2 uses a four-step handshake to provide exactly-once delivery. If a client begins a QoS 2 transaction but disconnects before the handshake completes, `amqtt` retains the associated transaction state and packet identifier without an expiration mechanism to remove it.\n\nQoS 1 transactions are protected by a timeout mechanism, which defaults to 5 seconds, allowing abandoned state to be released. Equivalent timeout handling was not applied to incomplete QoS 2 transactions.\n\nAn attacker can repeatedly connect to the broker, initiate QoS 2 transactions, and disconnect before completing the handshake. Each incomplete transaction leaves state allocated in memory. Repeating this process causes broker memory consumption to grow continuously.\n\nSuccessful exploitation can cause:\n\n* Unbounded growth in broker memory usage\n* Accumulation of incomplete QoS 2 transaction state\n* Increasing memory pressure on the host system\n* Termination of the broker process when available memory is exhausted\n* Operating-system Out-Of-Memory (OOM) intervention\n* Complete loss of availability for the affected broker process\n\nExploitation does not require maintaining long-lived connections. An attacker can create incomplete QoS 2 transactions and disconnect, leaving the broker to retain the associated state after the network connection has closed.\n\nUnder the default configuration, anonymous clients can exploit the vulnerability without credentials. When authentication is enabled, any authenticated client permitted to initiate QoS 2 message flows may still be able to exploit it. Authentication alone is therefore not a sufficient mitigation.\n\n* Ecosystem: `pip`\n* Package: `amqtt`\n* Affected versions: `>= 0.11.0, <= 0.12.0`\n\nThe vulnerable code is present in the v0.11.0 release commit, 352678c87e50e501a8a5bb91fab73c9400fa046c, and remained present on the main branch as of 5ebbf366f6b79ab12a06f426ffd18ff28954e4ea. Versions before 0.11.0 were not evaluated.\n\nThis is a denial-of-service vulnerability only. No confidentiality or integrity impact has been identified. Successful exploitation causes degradation and eventual loss of availability through memory exhaustion.\n\n### Patches\n\nThe issue will be been patched in the `v0.12.1` released version; all users should upgrade.\n\nThe completed fix:\n\n* Apply transaction expiration handling consistently to incomplete QoS 1 and QoS 2 message flows\n* Expire abandoned QoS 2 state when the associated transaction does not complete within the configured timeout\n* Release the associated message state and packet identifiers when the transaction expires\n* Prevent disconnected clients from leaving incomplete QoS 2 transactions resident in broker memory indefinitely\n\nThe fixing commit is [`2755fd801a6f95e9b73e11116948b57a95348466`](https://github.com/Yakifo/amqtt/commit/2755fd801a6f95e9b73e11116948b57a95348466)\n\n### Workarounds\n\nAdministrators who cannot immediately upgrade should limit the ability of untrusted clients to create large numbers of incomplete QoS 2 transactions.\n\nWhere application requirements permit, preventing untrusted clients from using QoS 2 provides the strongest temporary mitigation.\n\nConnection and request rate limiting at a reverse proxy, load balancer, firewall, or other network layer can reduce the rate at which an attacker creates abandoned transactions, but does not eliminate the underlying vulnerability. An attacker able to continue creating incomplete QoS 2 transactions can still cause memory usage to increase over time.\n\nAdministrators should also monitor broker memory consumption and configure appropriate process or container memory limits to prevent exhaustion of host resources. Restarting the broker may reclaim abandoned state and restore availability, but the broker remains vulnerable until the patched version is installed.\n\nMQTT Keep Alive limits are not a sufficient mitigation because the vulnerable state persists after the client connection has already terminated.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "amqtt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.11.0"
      }, {
        "fixed" : "0.12.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.12.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Yakifo/amqtt/security/advisories/GHSA-wcqj-wx85-c75p"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-130176"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Yakifo/amqtt/pull/404"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Yakifo/amqtt/commit/2755fd801a6f95e9b73e11116948b57a95348466"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Yakifo/amqtt/commit/64a6f8c3ebc47640f2e092885c1d504c8f34f1af"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Yakifo/amqtt"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Yakifo/amqtt/releases/tag/v0.12.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-401", "CWE-772" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-20T14:54:50Z",
    "nvd_published_at" : "2026-11-19T20:17:28Z"
  }
}