CVE-2025-10543
JSON

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 packageVersionsReported by
Eclipse Foundation paho.mqtt.golang (Go MQTT v3.1 library)up to 1.5.0CVE List
github.com/eclipse/paho.mqtt.golang (Go)before 1.5.1GitHub Advisory Database, Go Vulnerability Database
eclipse paho_mqttup to 1.5.0NVD

All scores

eclipse6.3medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Classification

CWE-197CWE-681

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

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

SourceRecordLicence
CVE ListCVE-2025-10543 changed 2025-12-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-32fw-gq77-f2f2 changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2025-4173 changed 2026-02-04CC-BY-4.0
NVDCVE-2025-10543 changed 2026-10-18Public domain