Skip to main content

Zephyr RTOS CVE-2026-8718

HIGH
Out-of-bounds Write (CWE-787)
2026-08-10 zephyr
8.4
CVSS 3.1 · Vendor: zephyr
View

Attack ChainAIDerived

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

  1. Access
    Gain unprivileged thread execution on Zephyr device
  2. Delivery
    Open or inherit DTLS socket with peer CID negotiated
  3. Exploit
    Call getsockopt with optlen below 32 bytes
  4. Execution
    Syscall verifier allocates undersized kernel heap buffer
  5. Persist
    mbedtls_ssl_get_peer_cid() writes CID past buffer end
  6. Impact
    Corrupt adjacent kernel heap object for privilege escalation or denial of service

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

Three conditions must all be satisfied simultaneously. First, the firmware must be compiled with CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID=y, which is not a default Kconfig option. Second, the attacking thread must have an established DTLS connection on which the remote peer has negotiated a Connection ID of at least 1 byte - meaning the remote endpoint must also support and enable DTLS CID. Third, for the kernel-heap overflow path (the highest-impact variant), CONFIG_USERSPACE=y must be enabled, which partitions the address space and routes getsockopt through the syscall verifier that performs the fatal undersized allocation. Without CONFIG_USERSPACE, the overflow still occurs but is confined to the process heap rather than the kernel allocator. Exploitation is further limited to threads that already have an open, connected DTLS socket file descriptor; network-remote attackers who have not already achieved local code execution cannot trigger this path directly.

Impact

The CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H, score 8.4) accurately reflects the attack conditions: local access with low privileges and no interaction required, crossing a privilege boundary into the kernel. The scope change (S:C) is well-justified because the overflow targets kernel-heap memory from a userspace thread. Real-world risk is meaningfully constrained by three stacked prerequisites: the DTLS Connection ID feature must be compiled in (CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID), an active DTLS session with a negotiated peer CID must exist, and CONFIG_USERSPACE must be enabled for the most impactful kernel-crossing path. These are non-default Kconfig options typically found only in purpose-built embedded networking firmware. EPSS data was not provided in the input, so exploitation probability cannot be quantified. No CISA KEV listing and no public POC lower the immediate urgency compared to the raw CVSS score. Teams operating embedded IoT gateways or mesh network nodes on Zephyr v3.5.0 and later with DTLS CID enabled should treat this as a priority patch, while projects not using DTLS CID can deprioritize. The overflow content is the remote peer's CID, limiting attacker control over what bytes are written beyond the buffer boundary.

Exploit ScenarioDerived

An attacker with code execution as an unprivileged user thread on a Zephyr device - for example, via a compromised application partition - establishes or reuses a DTLS session on a socket with Connection ID negotiated. The thread calls getsockopt(SOL_TLS, TLS_DTLS_PEER_CID_VALUE) with an optlen smaller than 32 bytes, causing the syscall verifier to allocate an undersized kernel heap buffer and mbedtls_ssl_get_peer_cid() to write the peer CID beyond the allocation boundary, potentially corrupting adjacent kernel heap objects. No public POC is available at time of analysis, so successful exploitation would currently require custom tooling and knowledge of the target's heap layout.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Aug 10, 2026

Kernel-heap buffer overflow in Zephyr RTOS's DTLS socket layer allows a low-privileged user thread to write up to 31 bytes past an attacker-controlled heap allocation in the kernel. The root cause is that tls_opt_dtls_peer_connection_id_value_get() in subsys/net/lib/sockets/sockets_tls.c forwarded a caller-supplied optval buffer to mbedtls_ssl_get_peer_cid() without verifying the buffer was at least MBEDTLS_SSL_CID_OUT_LEN_MAX (32) bytes, while the syscall verifier in CONFIG_USERSPACE builds allocated exactly optlen bytes for the bounce buffer. No public exploit code has been identified at time of analysis, and this CVE is not listed in the CISA KEV catalog.

RemediationAI

Apply the upstream fix from commit aa317825a55a401315e8e17f620c70c02e8f176d (https://github.com/zephyrproject-rtos/zephyr/commit/aa317825a55a401315e8e17f620c70c02e8f176d), which adds a size guard rejecting any getsockopt call where optlen is below MBEDTLS_SSL_CID_OUT_LEN_MAX. A released tagged version incorporating this fix was not independently confirmed from the available input data - consult the Zephyr security advisory at https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-p3r6-mx6c-33gq for release version confirmation. If patching is not immediately possible, disable CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID in the project's Kconfig to remove the vulnerable code path entirely; the trade-off is loss of DTLS Connection ID support, which may affect session resumption in mobile DTLS deployments. Alternatively, if DTLS CID is required but CONFIG_USERSPACE is not, disabling CONFIG_USERSPACE removes the kernel-crossing overflow path, though the userspace-only heap corruption risk in non-syscall builds may remain depending on buffer layout.

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

Zephyr RTOS (CPE: cpe:2.3:a:zephyrproject:zephyr:*:*:*:*:*:*:*:*) is a small-footprint, real-time operating system for embedded and IoT devices, integrating mbedTLS for its TLS stack. The vulnerability (CWE-787: Out-of-bounds Write) resides in the getsockopt handler for SOL_TLS / TLS_DTLS_PEER_CID_VALUE. When CONFIG_USERSPACE is enabled, the syscall verifier z_vrfy_zsock_getsockopt uses k_usermode_alloc_from_copy and z_thread_malloc to allocate a kernel-side bounce buffer of exactly the caller-supplied optlen bytes. mbedtls_ssl_get_peer_cid() then copies the negotiated DTLS Connection ID - which can be 1 to MBEDTLS_SSL_CID_OUT_LEN_MAX (default 32) bytes - into that buffer without receiving a destination-size parameter, producing an unbounded write of up to 31 bytes beyond the allocation. The defect was introduced in Zephyr v3.5.0 when DTLS Connection ID support was added. The fix (commit aa317825a) inserts a size guard that returns -EINVAL when optlen is below MBEDTLS_SSL_CID_OUT_LEN_MAX before any copy is attempted.

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

Vendor (zephyr) PRIMARY 8.4 HIGH
AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H
vuln.today AI 8.4 HIGH

Local vector confirmed by userspace-thread requirement; PR:L because an unprivileged thread suffices; S:C for kernel boundary crossing; C:N as only the CID bytes (not secrets) are written.

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

Primary rating from Vendor (zephyr).

CVSS VectorVendor: zephyr

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
None
Integrity
High
Availability
High

DescriptionCVE.org

tls_opt_dtls_peer_connection_id_value_get() in subsys/net/lib/sockets/sockets_tls.c, which handles getsockopt(SOL_TLS, TLS_DTLS_PEER_CID_VALUE), passed the caller-supplied optval directly to mbedtls_ssl_get_peer_cid() without verifying the buffer was at least MBEDTLS_SSL_CID_OUT_LEN_MAX (default 32) bytes. mbedtls_ssl_get_peer_cid() copies the peer-negotiated DTLS Connection ID (length 1..MBEDTLS_SSL_CID_OUT_LEN_MAX) into that buffer without a destination-size parameter, so a caller-supplied optlen smaller than the CID causes a write of up to 31 bytes past the buffer end.

In CONFIG_USERSPACE builds the getsockopt syscall verifier (z_vrfy_zsock_getsockopt) bounce-buffers the user's optval into a kernel allocation of exactly optlen bytes (k_usermode_alloc_from_copy -> z_thread_malloc), so an unprivileged user thread that passes a small optlen on a connected DTLS socket with Connection ID enabled induces a kernel-heap buffer overflow, with the overflowing content being the remote peer's CID.

The defect requires CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID, an established DTLS session with a negotiated peer CID, and (for the kernel-crossing case) CONFIG_USERSPACE. Introduced when the TLS_DTLS_CID option was added (v3.5.0).

The fix rejects callers whose optlen is below MBEDTLS_SSL_CID_OUT_LEN_MAX with -EINVAL.

Executive ViewAI

Why It Matters

A kernel-level vulnerability in Zephyr RTOS allows low-privileged local processes to gain system control and escalate privileges, creating risk for organizations running Zephyr-based IoT and embedded systems in production. Although no public exploit code has been identified, the vulnerability requires immediate patching to prevent attackers with local device access from compromising system integrity.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Prevalence
Low
niche embedded RTOS, primarily IoT and constrained devices
Social Media
2
Sightings
Data Quality
5 sources
Confidence: Medium

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.1%
Patch available Yes
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
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
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.

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.

Affected Products (CPE)CVE.org

cpe:2.3:a:zephyrproject:zephyr:*:*:*:*:*:*:*:*

More in Zephyr

View all
CVE-2023-4260 CRITICAL POC
10.0 Sep 27

Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),

CVE-2026-1678 CRITICAL POC
9.8 Mar 05

An out-of-bounds write in the Zephyr RTOS DNS resolver (dns_unpack_name()) lets a crafted DNS response corrupt memory on

CVE-2023-5055 CRITICAL POC
9.8 Nov 21

Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit

CVE-2023-4257 CRITICAL POC
9.8 Oct 13

Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS

CVE-2023-3725 CRITICAL POC
9.8 Oct 06

Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner

CVE-2021-3323 CRITICAL POC
9.8 Oct 12

Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability

CVE-2021-3625 CRITICAL POC
9.8 Oct 05

Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable

CVE-2021-3319 CRITICAL POC
9.8 Oct 05

DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul

CVE-2018-1000800 CRITICAL POC
9.8 Sep 06

zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(

CVE-2023-4264 CRITICAL POC
9.6 Sep 27

Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul

CVE-2024-1638 CRITICAL POC
9.1 Feb 19

The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte

CVE-2023-5753 HIGH POC
8.8 Oct 25

Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c

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