CVE-2026-5857: Contiki-NG MQTT Client Out-of-Bounds Write in PUBLISH Topic Parser via Persistent State Between TCP Segments
Vulnerability summary
CVE-2026-5857 is a critical (CVSS 9.2) Out-of-bounds Write vulnerability in contiki-ng. EPSS estimates a 0.92% chance of exploitation in the next 30 days, higher than 59.8% of scored vulnerabilities.
Timeline
- 06-08-2026PublishedVulnerability first disclosed.
- 14-08-2026Last modifiedVulnerability information updated.
Description
Contiki-NG's MQTT client parse_publish_vhdr() in os/net/app-layer/mqtt/mqtt.c sets topic_len_received=1 before checking topic_len against the 64-byte limit, so an over-length topic returns early but leaves the flag set. On the next TCP segment, tcp_input() re-invokes the parser with topic_received==0, and the persisted topic_len_received==1 skips the length-reading block containing the guard, falling through directly to a memcpy() that uses the unvalidated 16-bit topic_len as the copy length. The 65-byte topic[] destination overruns into adjacent struct fields including the payload_chunk pointer, which subsequent MQTT code dereferences, giving a compromised or attacker-controlled broker an arbitrary-pointer-write primitive. Contiki-NG's MQTT implementation has no TLS support so the connection is plaintext. Impact ranges from information disclosure and denial of service to remote code execution on embedded targets without memory protection.
CVSS metrics
4 scores · 2 sources · 2 versions- NVDNIST9.2CriticalCVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- NVDNIST8.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.92%
Chance of exploitation in the next 30 days
Percentile
60%
Versus all other CVEs
30-day change
Increase +0.38 pp
From 0.54% on 22-09-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Contiki-ng1 product
- contiki-ng< a34a2dbdc8bea784bd2ae5079aa4be520cd74f2d
1 vendor · 1 product
References
4 links- github.com/contiki-ng/contiki-ng/pull/3163Issue Tracking
- y637f9qq2x.com/posts/cve-2026-5857/Technical Description