Description
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.
Published: 2026-08-06
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The flaw resides in Contiki-NG's LwM2M TLV parser function lwm2m_tlv_read(), which neglects the buffer length provided by its caller and reads up to six bytes from the input buffer without bounds checking. Because the calling code in lwm2m-engine.c only verifies that at least one byte remains, a crafted CoAP WRITE request that ends with a TLV carrying exactly one byte causes the parser to perform up to five reads beyond the buffer’s end. These out-of-bounds reads expose heap memory contents, including sensitive key material and peer addresses, through the parsed TLV fields, and corrupt parsing state via a corrupted tlv_len. The weakness is an unchecked read, CWE-125, and the primary impact is disclosure of confidential memory contents.

Affected Systems

This vulnerability affects all installations of the Contiki‑NG operating system that include the LwM2M module using the current TLV parser implementation. The flaw is present in every release prior to the patch committed in the Contiki‑NG repository (commit f1673b5766d4d4d514cefb8a0350f43653574997). No specific vendor versions are listed; however, any system using LwM2M in NoSec mode, which is the default for constrained devices, is exposed when it receives an outbound CoAP WRITE.

Risk and Exploitability

The CVSS score of 8.7 indicates high severity, and the exploitation probability is not available, though no KEV listing suggests no widespread exploitation has been observed. The vulnerability can be triggered remotely by sending a malformed CoAP WRITE message from an unauthenticated source; in NoSec mode there is no authentication required, so an attacker controlling any device capable of reaching the target can craft the request. Because the flaw reveals in-memory secrets and can corrupt parsing state, an attacker can read sensitive data and potentially destabilize the device, leading to a denial of service.

Generated by OpenCVE AI on August 7, 2026 at 00:36 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the patch that updates lwm2m_tlv_read in the Contiki‑NG source code (commit f1673b5766d4d4d514cefb8a0350f43653574997 or merge request #3165).
  • If immediate patching is infeasible, disable the LwM2M service or change Security Mode from NoSec to a mode that requires authentication, such as PSK or RPK.
  • Restrict CoAP traffic to trusted networks or enforce firewall rules that block unsolicited CoAP WRITE messages from unknown sources.
  • Monitor device logs for anomalous CoAP activity and intervene if out-of-bounds patterns appear.

Generated by OpenCVE AI on August 7, 2026 at 00:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 14 Aug 2026 17:15:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*

Fri, 07 Aug 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 07 Aug 2026 01:30:00 +0000

Type Values Removed Values Added
First Time appeared Contiki-ng
Contiki-ng contiki-ng
Vendors & Products Contiki-ng
Contiki-ng contiki-ng

Thu, 06 Aug 2026 22:15:00 +0000

Type Values Removed Values Added
Description 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.
Title Contiki-NG LwM2M TLV Parser Out-of-Bounds Read via Unchecked Buffer Length in lwm2m_tlv_read
Weaknesses CWE-125
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

cvssV4_0

{'score': 8.7, 'vector': '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'}


Subscriptions

Contiki-ng Contiki-ng
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-14T16:50:26.324Z

Reserved: 2026-04-08T19:28:35.667Z

Link: CVE-2026-5855

cve-icon Vulnrichment

Updated: 2026-08-07T16:19:55.561Z

cve-icon NVD

Status : Received

Published: 2026-08-06T22:18:10.590

Modified: 2026-08-07T17:17:05.047

Link: CVE-2026-5855

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-07T01:15:04Z

Weaknesses