CVE-2026-5857
published critical CVSS 4.0 · 9.2Contiki-NG MQTT Client Out-of-Bounds Write in PUBLISH Topic Parser via Persistent State Between TCP Segments
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Contiki-NG | — | Contiki-NG0 to < a34a2dbdc8bea784bd2ae5079aa4be520cd74f2d · Other versions: affected | Affected | Not stated | VulnCheck |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 9.2 / 10
- Severity
- critical
- Provider
- VulnCheck · cna
- Vector string
- CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- Scenarios
- en: GENERAL
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 8.1 | high | VulnCheck · cna | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H | en: GENERAL |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Contiki-NG | Contiki-NG | 0 to < a34a2dbdc8bea784bd2ae5079aa4be520cd74f2d (affected · custom)Default: affected | VulnCheck · cna |
Weaknesses
1- CWE-787 Out-of-bounds Write
References
4- https://github.com/contiki-ng/contiki-ng
- https://github.com/contiki-ng/contiki-ng/commit/a34a2dbdc8bea784bd2ae5079aa4be520cd74f2d
- https://github.com/contiki-ng/contiki-ng/pull/3163
- Blog Post https://y637f9qq2x.com/posts/cve-2026-5857/
Provider assertions
2VulnCheck · cna
Contiki-NG MQTT Client Out-of-Bounds Write in PUBLISH Topic Parser via Persistent State Between TCP Segments
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 535601bce75926741f6bde390260de9f47d62f7b00df2401a27faf1a8e0c28de
- Ingested
- 08 Nov 2026, 14:15:24 UTC
- Source record
- Official CVE record