os/net/app-layer/mqtt/mqtt.c sets topic_len_received=1 · Contiki-NG's MQTT client parse_publish_vhdr()
Source GCVE Database
Not known to be exploited · CVSS 8.1 High.
Data as of 6 Nov 2026, 23:24 UTC
- EPSS
- 0.9% chance of exploitation in 30 days – higher than 60% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 7 Aug 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 6 Nov 2026.
What to do
AI-suggested
Until an official fix is available, avoid connecting Contiki-NG MQTT clients to untrusted or attacker-controlled brokers. Consider network-level protections to restrict broker access. Monitor vendor channels for patches or updates addressing this vulnerability.
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.
References
- nvd.nist.gov/vuln/detail/CVE-2026-5857 (opens in a new tab)
- github.com/contiki-ng/contiki-ng/pull/3163 (opens in a new tab)
- github.com/contiki-ng/contiki-ng/commit/a34a2dbdc8bea784bd2ae5079aa4be520cd74f2d (opens in a new tab)
- github.com/contiki-ng/contiki-ng (opens in a new tab)
- y637f9qq2x.com/posts/cve-2026-5857 (opens in a new tab)