Skip to main content

Zephyr RTOS CVE-2026-13215

| EUVDEUVD-2026-65292 MEDIUM
Out-of-bounds Write (CWE-787)
2026-08-25 zephyr
6.8
CVSS 3.1 · Vendor: zephyr
View

Attack ChainAIDerived

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

  1. Recon
    Obtain or craft ext2 image with malicious s_log_block_size
  2. Delivery
    Insert storage medium into target Zephyr device
  3. Exploit
    Device mounts ext2 filesystem triggering driver
  4. Install
    s_log_block_size passes ext2_verify_disk_superblock unvalidated
  5. C2
    Block slab initialized past static buffer bounds
  6. Execute
    First block read writes out-of-bounds in kernel memory
  7. Impact
    Supervisor-mode DoS or code execution

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

Exploitation requires physical or supply-chain access to the target device sufficient to present a crafted ext2-formatted storage medium - for example, inserting a malicious SD card or USB mass storage device, or preloading a malicious embedded flash image. The Zephyr firmware must be compiled with CONFIG_FILE_SYSTEM_EXT2=y (not enabled in all builds) and the application must perform a mount operation on the attacker-supplied medium, either automatically on media insertion or through an application trigger. No authentication credential or software privilege is required beyond physical device access. Exploitation is bounded by: (1) AV:P - requires physical proximity or supply-chain position; (2) the ext2 driver must be compiled into the firmware, which is not universal across Zephyr deployments; (3) the device must attempt to mount the medium, which depends on application behavior. Remote network exploitation is not possible given the physical attack vector.

Impact

The CVSS 3.1 vector (AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, score 6.8) accurately reflects the physical attack vector, which is the primary constraint on real-world risk: an adversary must physically insert a crafted storage medium into the target device. This limits the threat population to supply-chain actors, insiders, or individuals with brief physical device access, substantially reducing the exploitable population compared to network-reachable vulnerabilities. No EPSS data was provided, and the vulnerability does not appear in CISA KEV, indicating no confirmed widespread active exploitation. No public POC code is identified. Despite these constraints, the consequence of exploitation is severe: Zephyr runs on microcontrollers and embedded devices that typically lack ASLR, stack canaries, and other memory-safety mitigations common in general-purpose operating systems, meaning supervisor-mode memory corruption is more directly convertible to code execution. The wildcard NVD CPE (all Zephyr versions) means the specific affected and patched release boundaries must be confirmed against GHSA-j52j-gfj9-rwjm. The CVSS score of 6.8 is appropriate given the physical access requirement; this is not a high-priority internet-facing risk but represents a meaningful hardware supply-chain or physical-access threat for Zephyr-based devices that mount untrusted media.

Exploit ScenarioDerived

An attacker with brief physical access to a Zephyr-based embedded device inserts a crafted SD card whose ext2 superblock contains a manipulated s_log_block_size value (for example, 0xFFFFFFFF or any value producing a block size exceeding CONFIG_EXT2_MAX_BLOCK_SIZE). When the device mounts the medium - automatically on insertion or via an application - the kernel-mode ext2 driver passes the inflated block size to k_mem_slab_init(), silently misconfiguring the slab beyond its static backing buffer, and the first block read immediately overwrites adjacent static memory in supervisor mode. Depending on the Zephyr memory layout of the specific firmware build, this write could corrupt function pointers, security state, or task control structures, potentially enabling code execution in supervisor mode; no public POC code has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Aug 25, 2026

Out-of-bounds write in Zephyr RTOS's ext2 filesystem driver enables supervisor-mode memory corruption when a device mounts a crafted ext2 image from a physical storage medium such as an SD card. The driver's superblock validation function omits bounds-checking the s_log_block_size field, allowing an attacker-controlled value to produce an inflated block size that silently misconfigures the kernel memory slab allocator beyond its static backing buffer, with impact ranging from denial of service to potential code execution in kernel mode. No confirmed active exploitation or public POC is identified at time of analysis; a vendor patch is available as upstream commit f270f4bd0e59585da31e1fbaa79c5abf73f1364b.

RemediationAI

Apply the upstream patch at https://github.com/zephyrproject-rtos/zephyr/commit/f270f4bd0e59585da31e1fbaa79c5abf73f1364b, which adds validation in ext2_verify_disk_superblock() to reject any s_log_block_size greater than 11 (which would overflow the shift) or that produces a block size exceeding CONFIG_EXT2_MAX_BLOCK_SIZE, returning -ENOTSUP on failure. The specific tagged Zephyr release incorporating this fix is not independently confirmed from available data - verify the target release against GHSA-j52j-gfj9-rwjm before deploying. As an immediate compensating control where patching is not possible, disable ext2 filesystem support at the Kconfig level by not enabling CONFIG_FILE_SYSTEM_EXT2; this eliminates the attack surface entirely but will break any application functionality relying on ext2-formatted removable media. Alternatively, enforce strict physical access controls on storage medium ports (SD card slots, USB mass storage interfaces) to prevent insertion of untrusted media. Note that Kconfig-level exclusion requires a firmware rebuild and deployment, which may not be feasible for already-fielded devices without an OTA update mechanism.

Affected VersionsENISA

Zephyr 3.5.0 <4.4.2

Affected Packages

euvd zephyr fix: 4.4.2

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

The affected component is the ext2 filesystem driver within the Zephyr Real-Time Operating System, identified by CPE cpe:2.3:a:zephyrproject:zephyr:*:*:*:*:*:*:*:*. The root cause class is CWE-787 (Out-of-Bounds Write). The function ext2_verify_disk_superblock() in subsys/fs/ext2/ext2_impl.c performs several superblock integrity checks (magic number, revision, inode size, group counts) but does not validate the s_log_block_size field. The expression 1024 << s_log_block_size in subsys/fs/ext2/ext2_ops.c uses this attacker-controlled uint32_t: values ≥ 32 produce undefined behavior via shift overflow, while smaller but crafted values yield a block size far exceeding the compile-time constant CONFIG_EXT2_MAX_BLOCK_SIZE. This inflated block size is passed to k_mem_slab_init() by ext2_init_blocks_slab(), which carves allocator blocks out of the fixed static buffer __ext2_block_memory_buffer (sized CONFIG_EXT2_MAX_BLOCK_COUNT * CONFIG_EXT2_MAX_BLOCK_SIZE). Since k_mem_slab_init() does not verify that requested blocks fit the buffer, and ext2_init_blocks_slab() discards its return value, the slab metadata is silently misinitialized. The first block read then writes kernel-mode data past the end of the static buffer into adjacent BSS/data regions.

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 6.8 MEDIUM
AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 6.8 MEDIUM

Physical storage medium required (AV:P); no privilege or complexity beyond insertion; kernel-mode corruption yields full C/I/A impact with no scope change.

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

Primary rating from Vendor (zephyr).

CVSS VectorVendor: zephyr

Attack Vector
Physical
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

The Zephyr ext2 filesystem driver fails to validate the s_log_block_size field of the on-disk superblock when mounting a filesystem. ext2_verify_disk_superblock() in subsys/fs/ext2/ext2_impl.c checks the magic number, revision, inode size and group counts, but never bounds s_log_block_size. On a successful verify, subsys/fs/ext2/ext2_ops.c computes fs->block_size = 1024 << superblock.s_log_block_size from this attacker-controlled uint32_t, so a crafted value either overflows the shift (undefined behaviour) or yields a block size far larger than CONFIG_EXT2_MAX_BLOCK_SIZE.

That block size is then passed to k_mem_slab_init() by ext2_init_blocks_slab() to carve CONFIG_EXT2_MAX_BLOCK_COUNT blocks out of the fixed static buffer __ext2_block_memory_buffer, whose size is CONFIG_EXT2_MAX_BLOCK_COUNT * CONFIG_EXT2_MAX_BLOCK_SIZE. k_mem_slab_init() does not verify that the requested blocks fit the buffer, and the ext2 wrapper discards its return value, so the slab is laid out past the end of the static buffer. The mount immediately reads block-group, bitmap and inode blocks of fs->block_size bytes each into these slab blocks, producing an out-of-bounds write into adjacent static memory on the first block read.

The entire path is gated only by data read from the mounted image, making this reachable by any attacker who can present a crafted ext2 image to a device that mounts it (for example a removable SD card or storage medium). Because the ext2 driver runs in kernel mode, supplying image bytes yields a supervisor-mode memory-corruption primitive, with impact ranging from denial of service to potential code execution.

The fix rejects s_log_block_size values that overflow the shift (greater than 11) or that produce a block size exceeding CONFIG_EXT2_MAX_BLOCK_SIZE, so the block slab can no longer be initialized larger than its backing buffer.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
Low
embedded IoT RTOS, niche outside industrial and IoT device sectors
Data Quality
7 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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Total

Priority Score

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

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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