CVE-2025-10543: Github.com/eclipse/paho.mqtt.golang Eclipse Paho Go MQTT May Vulnerability

MODERATE
Advisory Identifier: GHSA-32fw-gq77-f2f2
CWE-197
Published
Advisory Summary

CVE-2025-10543 is a MODERATE eclipse paho go mqtt may vulnerability (CWE-197: Numeric Truncation Error) affecting Github.com/eclipse/paho.mqtt.golang libraries in the Go ecosystem. The issue involves eclipse paho go mqtt may incorrectly encode strings if length exceeds 65535 bytes. Remediation is available by upgrading affected packages to version 1.5.1.

CVE-2025-10543 at a Glance

CVE Identifier CVE-2025-10543
GHSA Identifier GHSA-32fw-gq77-f2f2
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-197: Numeric Truncation Error
Affected Product Github.com/eclipse/paho.mqtt.golang
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2025-10543

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

github.com/eclipse/paho.mqtt.golang fixed: 1.5.1
Upgrade github.com/eclipse/paho.mqtt.golang to 1.5.1
Verify Direct and Transitive Dependencies

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

inspect dependencies for github.com/eclipse/paho.mqtt.golang

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-10543, inspect your project dependencies for Github.com/eclipse/paho.mqtt.golang:

inspect dependencies for github.com/eclipse/paho.mqtt.golang

Analyze the terminal output to locate any version of Github.com/eclipse/paho.mqtt.golang in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-197: Numeric Truncation Error, where truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. In Github.com/eclipse/paho.mqtt.golang, 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

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

CVE-2025-10543 Affected Github.com/eclipse/paho.mqtt.golang Versions

1 component(s)
Fixed Versions:
1.5.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/eclipse/paho.mqtt.golang
Go
< 1.5.1
1.5.1

References

Frequently Asked Questions

What is CVE-2025-10543?
CVE-2025-10543 is a security vulnerability in Github.com/eclipse/paho.mqtt.golang involving Eclipse Paho Go MQTT may incorrectly encode strings if length exceeds 65535 bytes under CWE-197: Numeric Truncation Error.
Which Github.com/eclipse/paho.mqtt.golang versions are affected?
Affected versions include releases prior to 1.5.1 across affected packages: github.com/eclipse/paho.mqtt.golang.
What version fixes CVE-2025-10543?
Upgrading to 1.5.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/eclipse/paho.mqtt.golang affected?
Yes, github.com/eclipse/paho.mqtt.golang is affected in releases prior to 1.5.1. Upgrade your dependency to 1.5.1 or later.
What CWE is associated with CVE-2025-10543?
CVE-2025-10543 is classified under CWE-197: Numeric Truncation Error (Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion.).
How can I check Go dependencies for CVE-2025-10543?
Run the dependency tree command: 'inspect dependencies for github.com/eclipse/paho.mqtt.golang'. 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-32fw-gq77-f2f2",
  "modified" : "2025-12-17T00:43:02Z",
  "published" : "2025-12-02T09:30:26Z",
  "aliases" : [ "CVE-2025-10543" ],
  "summary" : "Eclipse Paho Go MQTT may incorrectly encode strings if length exceeds 65535 bytes",
  "details" : "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).\n\nThe 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).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/eclipse/paho.mqtt.golang"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.5.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-10543"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eclipse-paho/paho.mqtt.golang/issues/730"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eclipse-paho/paho.mqtt.golang/pull/714"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/alpinelinux/build-server-status/commit/e3487897db32c8c3d0287643f8384a6669e93731"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-32fw-gq77-f2f2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/eclipse-paho/paho.mqtt.golang"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.eclipse.org/security/vulnerability-reports/-/issues/254"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-197" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-02T17:34:33Z",
    "nvd_published_at" : "2025-12-02T09:15:46Z"
  }
}