Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconEstablish DTLS session as authorized LwM2M server
-
DeliveryTarget a STRING-type resource on the client
-
ExploitCraft CoAP WRITE with JSON string length == resource buflen
-
InstallTrigger get_string() off-by-one overflow
-
C2Write NUL byte past buffer boundary
-
ExecuteCorrupt adjacent memory field
-
ImpactCause crash or silent data corruption
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The attacker must control or impersonate a LwM2M server with an active DTLS session to the target Zephyr client (CVSS PR:L reflects this authorized-peer requirement - unauthenticated or anonymous network access alone is not sufficient). The device must be compiled with Zephyr's LwM2M subsystem enabled (CONFIG_LWM2M) and must expose at least one LWM2M_RES_TYPE_STRING resource. Exploitation is only possible when the LwM2M WRITE uses JSON content format; the other formatters (TLV, plain text, CBOR, SenML CBOR, SenML JSON) are not affected. The exact crash or corruption outcome depends on runtime memory layout adjacent to the target buffer, which the attacker cannot control. Limiting factors: requires an authorized LwM2M server role with an established DTLS session; requires a STRING-typed resource target; and impact is constrained to a single deterministic NUL-byte write with layout-dependent consequences. |
| Impact | The CVSS 5.4 base score (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L) accurately reflects a network-reachable, low-complexity flaw requiring low-privilege access - specifically, an established LwM2M server role over a DTLS session. EPSS data is absent from the provided intelligence set, so exploitation probability cannot be quantified. KEV status is not confirmed and this CVE does not appear as actively exploited. No public exploit code has been identified, though the publicly visible commit diff and GHSA advisory substantially lower the barrier for an attacker to reproduce the flaw. Real-world risk is constrained by two factors: the overflow writes exactly one fixed byte (0x00) at a deterministic offset, and the actual damage depends on the platform's memory layout at runtime, which the attacker cannot control. This limits the primitive to a reliability/DoS concern or silent data corruption rather than a reliable code-execution path in most configurations; however, on safety-critical or resource-constrained embedded devices typical of Zephyr deployments, even a controllable crash or state corruption carries operational consequences beyond what the CVSS score alone suggests, and operators managing fleets of LwM2M-connected devices should treat patch deployment as a near-term priority. |
| Exploit ScenarioDerived | A malicious or compromised LwM2M management server with an active DTLS session to a Zephyr client sends a CoAP WRITE request targeting a STRING-type resource, encoding a JSON string payload whose byte length exactly equals the resource's configured maximum buffer size. The client's do_write_op_json() parses the payload, invokes get_string(), which copies the string into the buffer and writes a NUL byte one position past the end, silently corrupting an adjacent memory field - potentially a length field, counter, flag, or neighboring resource value - resulting in a subsequent crash or undetected data mishandling. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 31, 2026
Off-by-one out-of-bounds write in Zephyr RTOS's LwM2M JSON formatter allows a LwM2M server peer to corrupt one byte of memory adjacent to a STRING resource buffer by sending a WRITE payload whose string length exactly equals the buffer size. Affected devices are Zephyr LwM2M clients with the JSON content formatter enabled (cpe:2.3:a:zephyrproject:zephyr:*:*:*:*:*:*:*:*). The overflow deterministically writes a NUL byte past the buffer boundary, enabling potential crash or silent data corruption depending on memory layout; no public exploit has been identified at time of analysis, but the fix commit and security advisory are publicly visible.
RemediationAI
Apply upstream commit ba38f4b94337cc2c2446277ac181bdb5fec8f2b2, which changes the off-by-one guard in get_string() from string_length > buflen to string_length >= buflen, aligning the JSON formatter with all other LwM2M content formatters. The fix and advisory are available at https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-vg53-h6qq-xx7h and https://github.com/zephyrproject-rtos/zephyr/commit/ba38f4b94337cc2c2446277ac181bdb5fec8f2b2. No specific fixed release version is confirmed from the provided data; consumers should cherry-pick the commit onto their target Zephyr branch. As a compensating control pending patching, restrict LwM2M server access to explicitly trusted peers using DTLS certificate-based or PSK authentication to reduce the population of entities that can send WRITE operations - note this does not eliminate the vulnerability but raises the exploitation bar. Alternatively, reconfiguring devices to use TLV, CBOR, or plain-text content formats instead of JSON (if deployment permits) avoids the vulnerable code path entirely, though this may require server-side changes and could affect interoperability.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Zephyr RTOS is an open-source real-time operating system for constrained IoT and embedded devices. The affected component is its LwM2M (Lightweight Machine-to-Machine) protocol stack, which operates over CoAP (Constrained Application Protocol) and is typically secured with DTLS. The root cause (CWE-787, Out-of-bounds Write) is an off-by-one boundary check in get_string() at subsys/net/lib/lwm2m/lwm2m_rw_json.c: the guard if (string_length > buflen) permits the case where string_length == buflen, causing memcpy() to fill the entire buffer and the subsequent NUL-terminator assignment buf[string_length] = '\0' to write one byte past the allocation. The destination is either a resource instance's fixed data buffer (res_inst->data_ptr/max_data_len) or the engine validation buffer, both on the heap or BSS. All other Zephyr LwM2M content formatters (plain text, OMA-TLV, SenML JSON, CBOR, SenML CBOR) already used the correct >= boundary check; the JSON formatter was the sole outlier. CPE cpe:2.3:a:zephyrproject:zephyr:*:*:*:*:*:*:*:* indicates the entire Zephyr version history prior to the fix is in scope.
Know when Zephyr gets its next vulnerability
- 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
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
Attacker must hold an authorized LwM2M server role over DTLS (PR:L); network-triggered with no complexity (AV:N/AC:L); no confidentiality impact; limited, layout-dependent integrity and availability effects.
Primary rating from Vendor (zephyr).
CVSS VectorVendor: zephyr
DescriptionCVE.org
The LwM2M JSON content formatter's get_string() in subsys/net/lib/lwm2m/lwm2m_rw_json.c copies a parsed JSON string into a caller-supplied buffer and NUL-terminates it. The length guard used if (string_length > buflen), which accepts a string whose length is exactly buflen. After memcpy() fills the whole buffer, buf[string_length] = '\0' then writes one byte past the end of the buffer (CWE-787).
The string value and its length are taken directly from the incoming CoAP payload during a LwM2M WRITE: do_write_op_json() parses the payload obtained from coap_packet_get_payload(), and get_string() is invoked from lwm2m_write_handler() (engine_get_string() in subsys/net/lib/lwm2m/lwm2m_message_handling.c) for a LWM2M_RES_TYPE_STRING resource. The destination buf/buflen is either the resource instance's fixed data buffer (res_inst->data_ptr/max_data_len) or the engine validation buffer (msg->ctx->validate_buf). A LwM2M server (the client's DTLS peer) can therefore write a string resource with a value whose length equals the target buffer size and force a one-byte overflow.
The overflow is a single out-of-bounds write of the constant byte 0x00 immediately past the resource or validation buffer, corrupting the adjacent byte in memory. It is not an information leak and the written value is fixed, so it is not a direct code-execution primitive, but it can corrupt adjacent state (an adjacent resource value, a length/flag field, or a struct field) and cause data corruption or a crash. Triggering the write is deterministic; the resulting impact depends on memory layout.
The fix changes the guard to string_length >= buflen, rejecting the exact-length case and aligning the JSON formatter with the other content formatters (lwm2m_rw_plain_text.c, lwm2m_rw_oma_tlv.c, lwm2m_rw_senml_json.c, lwm2m_rw_cbor.c, lwm2m_rw_senml_cbor.c), which already used the correct boundary check.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),
An out-of-bounds write in the Zephyr RTOS DNS resolver (dns_unpack_name()) lets a crafted DNS response corrupt memory on
Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit
Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS
Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner
Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability
Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable
DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul
zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(
Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul
The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte
Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c
EUVD-2026-68723
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB