{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-5857","id":"CVE-2026-5857","title":"Contiki-NG MQTT Client Out-of-Bounds Write in PUBLISH Topic Parser via Persistent State Between TCP Segments","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, fall","descriptionLong":"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.","published":"2026-08-06T18:52:40.005Z","updated":"2026-11-09T02:47:27.313936656Z","reserved":"2026-04-08T19:29:27.852Z","status":"Deferred","rejected":false,"assigner":"VulnCheck","metric":{"version":"4.0","score":9.2,"vector":"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","rating":"critical","source":"VulnCheck"},"metrics":[{"version":"4.0","score":9.2,"vector":"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","rating":"critical","source":"VulnCheck"},{"version":"4.0","score":9.2,"vector":"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/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","rating":"critical","source":"vulncheck.com"},{"version":"4.0","score":null,"vector":"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","rating":"unrated","source":"OSV"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"VulnCheck"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"vulncheck.com"}],"rating":"critical","products":["Contiki-NG"],"affectedProducts":[{"vendor":"Contiki-NG","product":"Contiki-NG","defaultStatus":"affected","versions":[{"status":"affected","version":"0","lessThan":"a34a2dbdc8bea784bd2ae5079aa4be520cd74f2d","versionType":"custom"}],"platforms":[]}],"packages":[],"cwes":["CWE-787"],"aliases":[],"references":[{"url":"https://github.com/contiki-ng/contiki-ng","tags":["product","package"]},{"url":"https://github.com/contiki-ng/contiki-ng/pull/3163","tags":["issue-tracking","patch","fix"]},{"url":"https://github.com/contiki-ng/contiki-ng/commit/a34a2dbdc8bea784bd2ae5079aa4be520cd74f2d","tags":["patch","fix"]},{"url":"https://y637f9qq2x.com/posts/cve-2026-5857/","tags":["technical-description","article"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/5xxx/CVE-2026-5857.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-5857","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial"},"epss":0.00919,"epssPercentile":0.60955,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-5857","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-5857","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-5857","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-5857","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}