Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/eclipse/paho.mqtt.golang
  4. ›
  5. CVE-2025-10543

CVE-2025-10543: Eclipse Paho Go MQTT may incorrectly encode strings if length exceeds 65535 bytes

December 2, 2025

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).

References

  • github.com/advisories/GHSA-32fw-gq77-f2f2
  • github.com/alpinelinux/build-server-status/commit/e3487897db32c8c3d0287643f8384a6669e93731
  • github.com/eclipse-paho/paho.mqtt.golang
  • github.com/eclipse-paho/paho.mqtt.golang/issues/730
  • github.com/eclipse-paho/paho.mqtt.golang/pull/714
  • gitlab.eclipse.org/security/vulnerability-reports/-/issues/254
  • nvd.nist.gov/vuln/detail/CVE-2025-10543

Code Behaviors & Features

Detect and mitigate CVE-2025-10543 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.5.1

Fixed versions

  • 1.5.1

Solution

Upgrade to version 1.5.1 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-197: Numeric Truncation Error

Source file

go/github.com/eclipse/paho.mqtt.golang/CVE-2025-10543.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 14 Dec 2025 12:18:34 +0000.