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… (CVE-2026-5855)
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.
AI Analysis
Technical Summary
The vulnerability in Contiki-NG's LwM2M TLV parser (lwm2m_tlv_read() in os/services/lwm2m/lwm2m-tlv.c) is due to ignoring the caller-supplied buffer length argument and reading up to six bytes without bounds checking. The caller in lwm2m-engine.c iterates while at least one byte remains, enabling a crafted CoAP WRITE message with a final TLV of exactly one byte to trigger up to five out-of-bounds heap reads adjacent to the input buffer. This results in disclosure of memory contents through the parsed TLV fields (id, length, value). Additionally, corrupted TLV length values cause further parse offset corruption. Exploitation is feasible without authentication in the default NoSec mode used by constrained devices.
Potential Impact
An attacker can remotely send a specially crafted CoAP WRITE request to any LwM2M endpoint, causing out-of-bounds reads that disclose sensitive heap memory contents including key material and peer addresses. This memory disclosure can compromise confidentiality of sensitive data. The vulnerability does not directly impact confidentiality, integrity, or availability according to the CVSS vector, but the CVSS base score indicates high severity due to the potential for information disclosure and parse corruption. No authentication is required in the default NoSec mode, increasing the attack surface on constrained devices.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a patch is available, users should consider disabling LwM2M NoSec mode or restricting access to LwM2M endpoints to trusted networks to reduce exposure. Monitor vendor channels for official fixes or updates addressing this vulnerability.
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… (CVE-2026-5855)
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.
CVSS v3.1
Score 7.5high
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Contiki-NG's LwM2M TLV parser (lwm2m_tlv_read() in os/services/lwm2m/lwm2m-tlv.c) is due to ignoring the caller-supplied buffer length argument and reading up to six bytes without bounds checking. The caller in lwm2m-engine.c iterates while at least one byte remains, enabling a crafted CoAP WRITE message with a final TLV of exactly one byte to trigger up to five out-of-bounds heap reads adjacent to the input buffer. This results in disclosure of memory contents through the parsed TLV fields (id, length, value). Additionally, corrupted TLV length values cause further parse offset corruption. Exploitation is feasible without authentication in the default NoSec mode used by constrained devices.
Potential Impact
An attacker can remotely send a specially crafted CoAP WRITE request to any LwM2M endpoint, causing out-of-bounds reads that disclose sensitive heap memory contents including key material and peer addresses. This memory disclosure can compromise confidentiality of sensitive data. The vulnerability does not directly impact confidentiality, integrity, or availability according to the CVSS vector, but the CVSS base score indicates high severity due to the potential for information disclosure and parse corruption. No authentication is required in the default NoSec mode, increasing the attack surface on constrained devices.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a patch is available, users should consider disabling LwM2M NoSec mode or restricting access to LwM2M endpoints to trusted networks to reduce exposure. Monitor vendor channels for official fixes or updates addressing this vulnerability.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-ch5q-j8ff-mq34
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-5855"]
- Ecosystems
- []
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a75739fbf8831d539d91f52
Added to database: 08/07/2026, 05:56:47 UTC
Last enriched: 08/07/2026, 07:11:27 UTC
Last updated: 08/08/2026, 00:41:14 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.