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

> An integer overflow in the Eclipse Paho Go MQTT library allows attackers to cause data leakage or packet corruption by sending oversized UTF-8 strings.

- **Severity:** Medium 6.3 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 2 Dec 2025
- **Updated:** 2 Dec 2025
- **Also known as:** AZL-71299, AZL-71311, AZL-71320, AZL-71332, CLEANSTART-2026-QA96824, GHSA-32fw-gq77-f2f2, GO-2025-4173, MINI-3w7p-6j6p-cvr4, MINI-4gp3-cm78-q8w6, MINI-gjm4-h254-9hw5, MINI-j2m8-jx6w-8mpw, MINI-r4w5-qh4w-rfcg, MINI-r849-qfww-22m3, MINI-wcj8-rx5p-vm46, MINI-wp34-8ff5-c6fm, ROOT-APP-GOBINARY-CVE-2025-10543

## What is CVE-2025-10543?

CVE-2025-10543 is a medium-severity vulnerability in Eclipse Foundation paho.mqtt.golang (Go MQTT v3.1 library), published on 2 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-681 (Incorrect Conversion between Numeric Types), CWE-197 (Numeric Truncation Error)

## Which versions are affected by CVE-2025-10543?

3 open source packages ship an affected version, including github.com/eclipse/paho.mqtt.golang. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/eclipse/paho.mqtt.golang` | Go | All versions | 1.5.1 |
| `github.com/eclipse/paho.mqtt.golang` | Go | All versions | 1.5.1 |
| `github.com/eclipse/paho.mqtt.golang` | Go | All versions | 1.5.1 |

Products: Eclipse Paho Mqtt.

## How do I fix CVE-2025-10543?

Upgrade github.com/eclipse/paho.mqtt.golang to 1.5.1 or later.

## Is CVE-2025-10543 being exploited?

There is no known exploitation of CVE-2025-10543 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-10543 and fix it if it is affected.

What it is: CVE-2025-10543 is a medium-severity vulnerability in Eclipse Foundation paho.mqtt.golang (Go MQTT v3.1 library), published on 2 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-10543 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/eclipse/paho.mqtt.golang (Go): affected all versions; fixed in 1.5.1
- github.com/eclipse/paho.mqtt.golang (Go): affected all versions; fixed in 1.5.1
- github.com/eclipse/paho.mqtt.golang (Go): affected all versions; fixed in 1.5.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-10543/ (Markdown: https://insights.sbomify.com/CVE-2025-10543/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-10543
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-10543
- OSV: https://osv.dev/vulnerability/CVE-2025-10543

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-10543/
Summaries are generated and may contain mistakes; the official description above is the record.
