CVE-2026-130491: Uninitialized heap disclosure in CONNECT through Will payload length truncation
In Eclipse versions 1.5-1.6.13, 2.0.0-2.0.22 and 2.1.0-2.1.2, the client library libmosquitto does not reject Will messages with payloads greater than 65535 bytes when calling mosquittowillset() or mosquittowillsetv5(). This results in up to 65535 bytes of uninitialised heap memory being transmitted as the Will.
This can be mitigated by only passing payloads with a maximum length of 65535 bytes.
Affected Software
Event History
Frequently Asked Questions
Which applications are exposed to this issue?
Applications using the affected libmosquitto client-library versions are exposed if they set a Will message through mosquitto_will_set() or mosquitto_will_set_v5() with a payload larger than 65535 bytes.
What is required for memory disclosure to occur?
The vulnerable client must be configured to send a Will payload exceeding 65535 bytes. The oversized payload is not rejected, and up to 65535 bytes of uninitialized heap memory can be transmitted as the Will.
What mitigation is available if upgrading is not immediately possible?
Ensure all payloads passed to mosquitto_will_set() and mosquitto_will_set_v5() are no larger than 65535 bytes. This prevents the length truncation condition described.
How can I determine whether an application may already be affected?
Review the libmosquitto version in use and inspect calls to mosquitto_will_set() or mosquitto_will_set_v5(). Systems using the listed affected versions that can pass Will payloads above 65535 bytes may be affected.