Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.5%top 58%

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… (CVE-2026-5857)

0
Critical
Published: 08/07/2026 (08/07/2026, 00:31:20 UTC)
Source: GCVE Database

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 v3.1

Score 8.1high

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/07/2026, 07:11:36 UTC

Technical Analysis

The vulnerability in Contiki-NG's MQTT client arises because the parse_publish_vhdr() function sets a flag (topic_len_received) before validating the topic length against the 64-byte limit. If the topic length is over the limit, the function returns early but leaves the flag set. When the next TCP segment is processed, the parser skips the length validation block due to the persisted flag and directly performs a memcpy() using the unvalidated 16-bit topic length. This causes a buffer overflow in the 65-byte topic buffer, overwriting adjacent struct fields including a pointer used later by MQTT code. This gives an attacker controlling the broker an arbitrary pointer write primitive. The lack of TLS means the connection is plaintext, increasing exposure. The impact ranges from information disclosure and denial of service to remote code execution on embedded targets without memory protection.

Potential Impact

An attacker controlling the MQTT broker can exploit this vulnerability to perform an arbitrary pointer write on the client device. This can lead to information disclosure, denial of service, or remote code execution on embedded devices running Contiki-NG's MQTT client. The plaintext nature of the connection (no TLS support) increases the risk of interception and exploitation. The vulnerability is critical with a CVSS score of 8.1, indicating high impact on confidentiality, integrity, and availability.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. 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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-x5g5-4jq8-vj28
Osv Schema Version
1.4.0
Aliases
["CVE-2026-5857"]
Ecosystems
[]
Database Specific Severity
CRITICAL
Cvss Version
3.1

Threat ID: 6a75739dbf8831d539d91dfa

Added to database: 08/07/2026, 05:56:45 UTC

Last enriched: 08/07/2026, 07:11:36 UTC

Last updated: 08/08/2026, 00:41:14 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses