6.3medium
Eclipse Paho Go MQTT may incorrectly encode strings if length exceeds 65535 bytes
- Severity
- 6.3medium CVSS:4.0 by eclipse
- Exploit likelihood
- 0.24% (higher than 16% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- eclipse
- Also known as
- GHSA-32fw-gq77-f2f2GO-2025-4173
Description
In Eclipse Paho Go MQTT v3.1 library (paho.mqtt.golang) versions <=1.5.0 UTF-8 encoded strings, passed into the library, may be incorrectly encoded if their length exceeds 65535 bytes. This may lead to unexpected content in packets sent to the server (for example, part of an MQTT topic may leak into the message body in a PUBLISH packet). The issue arises because the length of the data passed in was converted from an int64/int32 (depending upon CPU) to an int16 without checks for overflows. The int16 length was then written, followed by the data (e.g. topic). This meant that when the data (e.g. topic) was over 65535 bytes then the amount of data written exceeds what the length field indicates. This could lead to a corrupt packet, or mean that the excess data leaks into another field (e.g. topic leaks into message body).
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Eclipse Foundation paho.mqtt.golang (Go MQTT v3.1 library) | up to 1.5.0 | CVE List |
| github.com/eclipse/paho.mqtt.golang (Go) | before 1.5.1 | GitHub Advisory Database, Go Vulnerability Database |
| eclipse paho_mqtt | up to 1.5.0 | NVD |
All scores
| eclipse | 6.3medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
Classification
What each source says
CVE List
In Eclipse Paho Go MQTT v3.1 library (paho.mqtt.golang) versions <=1.5.0 UTF-8 encoded strings, passed into the library, may be incorrectly encoded if their length exceeds 65535 bytes. This may lead to unexpected content in packets sent to the server (for example, part of an MQTT topic may leak into the message body in a PUBLISH packet). The issue arises because the length of the data passed in was converted from an int64/int32 (depending upon CPU) to an int16 without checks for overflows. The int16 length was then written, followed by the data (e.g. topic). This meant that when the data (e.g. topic) was over 65535 bytes then the amount of data written exceeds what the length field indicates. This could lead to a corrupt packet, or mean that the excess data leaks into another field (e.g. topic leaks into message body).
Go Vulnerability Database
Eclipse Paho Go MQTT may incorrectly encode strings if length exceeds 65535 bytes in github.com/eclipse/paho.mqtt.golang
NVD (es)
En las versiones menor o igual que 1.5.0 de la biblioteca Eclipse Paho Go MQTT v3.1 (paho.mqtt.golang), las cadenas codificadas en UTF-8, pasadas a la biblioteca, pueden codificarse incorrectamente si su longitud excede los 65535 bytes. Esto puede llevar a contenido inesperado en los paquetes enviados al servidor (por ejemplo, parte de un tema MQTT puede filtrarse en el cuerpo del mensaje en un paquete PUBLISH). El problema surge porque la longitud de los datos pasados se convirtió de un int64/int32 (dependiendo de la CPU) a un int16 sin comprobaciones de desbordamientos. La longitud int16 se escribió entonces, seguida de los datos (por ejemplo, el tema). Esto significaba que cuando los datos (por ejemplo, el tema) superaban los 65535 bytes, entonces la cantidad de datos escritos excedía lo que indicaba el campo de longitud. Esto podría llevar a un paquete corrupto, o significar que el exceso de datos se filtra en otro campo (por ejemplo, el tema se filtra en el cuerpo del mensaje).
References
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-10543 changed 2025-12-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-32fw-gq77-f2f2 changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2025-4173 changed 2026-02-04 | CC-BY-4.0 |
| NVD | CVE-2025-10543 changed 2026-10-18 | Public domain |