Bug 2418268 (CVE-2025-10543)

Summary: CVE-2025-10543 paho.mqtt.golang: paho.mqtt.golang: Integer Overflow in UTF-8 String Encoding
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bbrownin, caswilli, eglynn, jjoyce, jschluet, kaycoth, lhh, mbocek, mburns, mgarciac
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in paho.mqtt.golang. This vulnerability allows data leakage and packet corruption via malformed UTF-8 (Unicode Transformation Format - 8-bit) encoded strings exceeding 65535 bytes due to an integer overflow.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2422996, 2422997, 2422998, 2422999, 2423000, 2423002, 2423003, 2423004, 2423006, 2423008, 2423009, 2423011, 2423013, 2423015, 2423017, 2423018, 2423021, 2423001, 2423005, 2423007, 2423010, 2423012, 2423014, 2423016, 2423020, 2423022    
Bug Blocks:    

Description OSIDB Bzimport 2025-12-02 09:01:16 UTC
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).