Skip to main content

Contiki-NG EUVDEUVD-2026-54221

| CVE-2026-5855 HIGH
Out-of-bounds Read (CWE-125)
2026-08-06 disclosure@vulncheck.com GHSA-ch5q-j8ff-mq34
8.7
CVSS 4.0 · Vendor: vulncheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send unauthenticated CoAP UDP WRITE to LwM2M endpoint
  2. Delivery
    Craft TLV payload with exactly 1-byte final TLV
  3. Exploit
    Re-enter lwm2m_tlv_read() with len=1, no bounds check
  4. Execution
    Read 5 bytes past CoAP heap buffer boundary
  5. Persist
    Leak key material and peer addresses into parsed TLV fields
  6. Impact
    Recover disclosed heap contents from response or side channel

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the target device to be running Contiki-NG with the LwM2M service compiled in (os/services/lwm2m/ present in the build) and configured in NoSec mode - explicitly described as the default for constrained devices. The attacker must be able to send CoAP UDP datagrams (typically port 5683) to the device. The crafted WRITE request must contain a TLV-encoded body where the final TLV entry supplies exactly one byte, which is the precise condition that causes lwm2m-engine.c to call lwm2m_tlv_read() with len=1 and no remaining boundary. No authentication is required under NoSec mode (PR:N). Exploitation is blocked on devices where LwM2M DTLS security is enabled, as authentication and encryption are enforced before any WRITE is processed; the code-level flaw exists regardless, but unauthenticated access is removed. No specific platform version, hardware architecture, or non-default compile-time option beyond LwM2M service inclusion is required.

Impact

The CVSS 4.0 score of 8.7 with AV:N/AC:L/AT:N/PR:N/UI:N reflects a low-complexity, unauthenticated, network-reachable trigger - consistent with the NoSec mode default described. However, the submitted vector records VC:N (no confidentiality impact on the vulnerable system), which is in direct tension with the description's explicit disclosure of heap-resident cryptographic key material and peer addresses. This appears to be a scoring inconsistency: the availability-only framing (VA:H) likely captured the parse-corruption/crash pathway but underweighted the memory disclosure. An independent assessment elevates VC to High given that pre-shared keys or session state adjacent to the CoAP input buffer could be exfiltrated. EPSS data is unavailable (CVE is newly assigned as of 2026). No CISA KEV listing and no public exploit code have been identified, so active exploitation is not confirmed. However, the attack trigger is fully deterministic and precisely described - the barrier to constructing a proof-of-concept is low for anyone with access to a CoAP client. Real-world risk is highest in deployments where LwM2M NoSec is active and devices are reachable from untrusted networks, a common pattern in LPWAN and mesh IoT deployments.

Exploit ScenarioDerived

An attacker with UDP reachability to a Contiki-NG device operating in LwM2M NoSec mode sends a single unauthenticated CoAP WRITE request to any registered LwM2M object endpoint, with a TLV-encoded body whose final TLV record contains exactly one byte of payload. The parser re-enters lwm2m_tlv_read() with len=1, reads five bytes beyond the buffer boundary from adjacent heap memory, and populates tlv->id, tlv->length, and tlv->value with the leaked contents - potentially including DTLS pre-shared keys, session tokens, or neighbor peer addresses stored nearby in the heap. If the LwM2M engine echoes parsed values back in a response or logs them to an observable channel, the attacker can recover the disclosed material.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 06, 2026

Out-of-bounds heap read in Contiki-NG's LwM2M TLV parser discloses adjacent heap memory - including cryptographic key material and peer IP addresses - to any unauthenticated network attacker. The flaw in lwm2m_tlv_read() (os/services/lwm2m/lwm2m-tlv.c) is triggered by a single crafted CoAP WRITE request whose final TLV supplies exactly one byte, causing the parser to read up to five bytes beyond the buffer boundary. Because LwM2M NoSec mode is the default for constrained IoT devices, no authentication is required, and the upstream fix is confirmed in commit f1673b5766d4d4d514cefb8a0350f43653574997 (PR #3165) but a tagged release has not been independently confirmed. No public exploit or CISA KEV listing has been identified at time of analysis.

RemediationAI

The upstream fix is confirmed in commit f1673b5766d4d4d514cefb8a0350f43653574997, available at https://github.com/contiki-ng/contiki-ng/commit/f1673b5766d4d4d514cefb8a0350f43653574997, and tracked via pull request #3165 (https://github.com/contiki-ng/contiki-ng/pull/3165). Integrators should cherry-pick this commit into their Contiki-NG builds immediately; a tagged release has not been confirmed so monitor https://github.com/contiki-ng/contiki-ng for an official version tag. As the most effective compensating control, enabling LwM2M DTLS security mode (disabling NoSec) eliminates the unauthenticated attack vector entirely by requiring credential negotiation before any WRITE is processed - the trade-off is increased RAM, flash, and power consumption on constrained hardware, and the requirement to provision PSK or certificate credentials. If DTLS cannot be enabled, restricting CoAP UDP port 5683 at the network perimeter to known LwM2M server addresses reduces exposure, though this does not help when the attacker is on the same LAN or mesh segment. Disabling the LwM2M service at compile time (removing os/services/lwm2m/ from the build) eliminates the attack surface entirely if the service is not required.

Affected VersionsENISA

contiki-ng 0 <f1673b5766d4d4d514cefb8a0350f43653574997

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Contiki-NG is an open-source RTOS for constrained IoT devices implementing OMA LwM2M over CoAP/UDP. The affected code path is the TLV (Type-Length-Value) deserializer in os/services/lwm2m/lwm2m-tlv.c, which decodes object instances in LwM2M WRITE operations. CWE-125 (Out-of-Bounds Read) is the root cause: lwm2m_tlv_read() accepts a caller-supplied len argument representing remaining buffer bytes but performs no bounds validation before indexing into the buffer for the type byte, one or two ID bytes, zero to three length bytes, and the value field - a maximum of six bytes total. The caller loop in lwm2m-engine.c iterates while tlvpos < insize, and because it only requires one remaining byte to re-enter the loop, a one-byte final TLV bypasses any incidental protection. The commit diff confirms the fix adds three explicit guards: a minimum 2-byte header check, a check that len_pos + len_type <= len before reading ID and length fields, and a check that tlv_len <= len - len_pos before assigning the value pointer. No CPE string was provided; the canonical repository is https://github.com/contiki-ng/contiki-ng.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (vulncheck) PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 9.4 CRITICAL

Network-reachable CoAP in NoSec default requires no auth (PR:N); heap key material disclosure warrants C:H; parse-offset corruption gives I:L; device crash potential from corrupted loop state gives A:H.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (vulncheck).

CVSS VectorVendor: vulncheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Contiki-NG's LwM2M TLV parser lwm2m_tlv_read() in os/services/lwm2m/lwm2m-tlv.c ignores its caller-supplied buffer length argument and reads up to six bytes from the input buffer with no bounds check. The caller in lwm2m-engine.c iterates while there is at least one byte remaining, so a crafted CoAP WRITE to any LwM2M endpoint whose final TLV supplies exactly one byte triggers up to five out-of-bounds reads of heap memory adjacent to the CoAP input buffer, disclosing memory contents (including key material and peer addresses) through the parsed tlv->id, tlv->length, and tlv->value fields. Corrupted tlv_len derived from the out-of-bounds memory further corrupts the caller's parse offset. In LwM2M NoSec mode, the default for constrained devices, no authentication is required.

Executive ViewAI

Why It Matters

Contiki-NG IoT devices using the default LwM2M configuration leak cryptographic keys to unauthenticated network attackers, enabling device impersonation and network compromise. This affects any deployed Contiki-NG device that has not explicitly disabled LwM2M NoSec mode, creating perimeter risk for IoT infrastructure without authentication barriers.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Configure LwM2M Security mode instead of NoSec on affected devices if firmware flexibility permits; (2) Restrict CoAP traffic (UDP port 5683) at network perimeter to trusted endpoints only; (3) Implement key rotation procedures for any device potentially exposed during operation in NoSec mode; (4) Consider interim deployment of Contiki-NG builds from upstream commit f1673b5766d4d4d514cefb8a0350f43653574997 after internal security validation.

Threat Intelligence Overview

EPSS Score
0.5%
Top 58% exploitable
Prevalence
Low
niche open-source IoT RTOS, primarily research and constrained-device prototyping
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.5%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

45
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy