GHSA-32fw-gq77-f2f2

Suggest an improvement
Source
https://github.com/advisories/GHSA-32fw-gq77-f2f2
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/12/GHSA-32fw-gq77-f2f2/GHSA-32fw-gq77-f2f2.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-32fw-gq77-f2f2
Aliases
  • CVE-2025-10543
Published
2025-12-02T09:30:26Z
Modified
2025-12-02T18:27:47.504461Z
Severity
  • 6.3 (Medium) CVSS_V4 - 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 CVSS Calculator
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).

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

Database specific
{
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2025-12-02T17:34:33Z",
    "nvd_published_at": "2025-12-02T09:15:46Z",
    "cwe_ids": [
        "CWE-197"
    ]
}
References

Affected packages

Go / github.com/eclipse/paho.mqtt.golang

Package

Name
github.com/eclipse/paho.mqtt.golang
View open source insights on deps.dev
Purl
pkg:golang/github.com/eclipse/paho.mqtt.golang

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.5.1