Contiki-NG MQTT Client mqtt.c parse_publish_vhdr topic buffer overflow
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 8.7 | $0-$5k | 2.14 |
Summary
A vulnerability was found in Contiki-NG. It has been classified as very critical. Affected is the function parse_publish_vhdr of the file os/net/app-layer/mqtt/mqtt.c of the component MQTT Client. The manipulation of the argument topic leads to buffer overflow.
This vulnerability is referenced as CVE-2026-5857. Remote exploitation of the attack is possible. No exploit is available.
Details
A vulnerability was found in Contiki-NG (unknown version) and classified as very critical. This issue affects the function parse_publish_vhdr of the file os/net/app-layer/mqtt/mqtt.c of the component MQTT Client. The manipulation of the argument topic with an unknown input leads to a buffer overflow vulnerability. Using CWE to declare the problem leads to CWE-120. The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. Impacted is confidentiality, integrity, and availability. The summary by CVE is:
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.
The advisory is shared at github.com. The identification of this vulnerability is CVE-2026-5857 since 04/08/2026. The exploitation is known to be easy. The attack may be initiated remotely. The exploitation requires an enhanced level of successful authentication. Technical details are known, but no exploit is available. The price for an exploit might be around USD $0-$5k at the moment (estimation calculated on 08/07/2026).
Applying the patch a34a2dbdc8bea784bd2ae5079aa4be520cd74f2d is able to eliminate this problem.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Product
Name
License
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 9.1VulDB Meta Temp Score: 8.7
VulDB Base Score: 9.1
VulDB Temp Score: 8.7
VulDB Vector: 🔒
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Buffer overflowCWE: CWE-120 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒
Physical: No
Local: No
Remote: Yes
Availability: 🔒
Status: Not defined
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: PatchStatus: 🔍
0-Day Time: 🔒
Patch: a34a2dbdc8bea784bd2ae5079aa4be520cd74f2d
Timeline
04/08/2026 CVE reserved08/07/2026 Advisory disclosed
08/07/2026 VulDB entry created
08/07/2026 VulDB entry last update
Sources
Advisory: github.comStatus: Confirmed
CVE: CVE-2026-5857 (🔒)
GCVE (CVE): GCVE-0-2026-5857
GCVE (VulDB): GCVE-100-386825
Entry
Created: 08/07/2026 02:15Changes: 08/07/2026 02:15 (56)
Complete: 🔍
Cache ID: 216::103
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
No comments yet. Languages: en.
Please log in to comment.