Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain raw flash write access (physical debug or unauthenticated update)
-
DeliveryWrite NVS settings entry with name length exceeding 74 bytes
-
ExploitReboot or reinitialize target device
-
Executionsettings_load() reads oversized entry via nvs_read()
-
PersistUnclamped return value used as NUL index past stack buffer
-
ImpactStack corruption triggers CPU fault, device crash
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 has one hard prerequisite: the attacker must have write access to the raw NVS flash partition backing the Zephyr settings subsystem. The three concrete paths to meeting that condition are: (1) a co-resident RTOS task or firmware component that shares access to the same flash device without partition isolation; (2) delivery of a malformed settings image or full firmware image through an update channel that does not enforce cryptographic image authentication; or (3) offline or physical flash access via hardware debug interfaces (JTAG, SWD) or external flash programmers. The vulnerability is explicitly unreachable through the normal Zephyr settings API, which enforces SETTINGS_MAX_NAME_LEN and would never write an oversized name, and is unreachable over any network interface. Triggering the bug additionally requires that the malformed entry be in flash before settings_load() runs at boot or subsystem init, or before settings_save() iterates existing entries. The affected code path is further limited to Zephyr builds with the NVS settings backend enabled at compile time. |
| Impact | The provided CVSS 3.1 vector (AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H, score 5.3) accurately captures the constrained threat model. Attack complexity is genuinely high: the vulnerability is only reachable by an actor with raw flash write capability, not through the normal settings API or any network interface. The primitive - a single deterministic NUL byte at an attacker-chosen stack offset - is a reliable denial-of-service path but not a reliable code execution primitive; the 'RCE' tag in the input metadata overstates impact relative to what the description supports. No KEV listing exists and no EPSS score was supplied, leaving exploitation probability unquantified, though the hard prerequisite of flash write access significantly limits the exploitable population. Risk is most elevated in deployment models that accept externally supplied firmware images without cryptographic verification, that share flash between trusted and untrusted co-resident components, or that expose physical debug interfaces without protection - operators relying on authenticated firmware update channels and partition isolation reduce real-world risk substantially below what a raw CVSS score implies. |
| Exploit ScenarioDerived | An attacker with physical access to a Zephyr-based IoT sensor uses a JTAG debug probe or flash programmer to write a settings NVS entry whose name field is padded to a length exceeding 74 bytes directly into the device's flash settings partition, bypassing the normal settings API that would have rejected it. On the next power cycle, settings_load() processes the crafted entry: nvs_read() returns the full oversized length, and the unclamped NUL write lands well past the 74-byte stack buffer in settings_nvs_load(), corrupting adjacent stack frame data and triggering a CPU fault exception that halts normal device operation indefinitely. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 19, 2026
Stack out-of-bounds write in Zephyr RTOS's NVS settings backend affects all tracked versions via three sites in settings_nvs.c that use nvs_read()'s unclamped return value as a NUL-terminator index into a fixed 74-byte stack buffer. An actor with write access to the raw flash partition backing the settings subsystem can plant an oversized name entry that causes a single-byte stack write at an attacker-controlled offset whenever settings_load() or settings_save() processes it, reliably crashing the device. No public exploit identified at time of analysis; upstream fix is available at commit e79a0db but the exact first patched release is not independently confirmed.
RemediationAI
The upstream fix is available at commit e79a0db70fc9ad33982f9786b428b115a78eaadd in the zephyrproject-rtos/zephyr repository (https://github.com/zephyrproject-rtos/zephyr/commit/e79a0db70fc9ad33982f9786b428b115a78eaadd). Downstream integrators should cherry-pick this commit or upgrade to the earliest Zephyr release that includes it - verify the exact fixed release against GHSA-q7c8-m2qg-385c (https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-q7c8-m2qg-385c), as no tagged version is confirmed from current data. Where immediate patching is not feasible, three specific compensating controls apply: (1) Disable the NVS settings backend at compile time via Kconfig if it is not required, eliminating the attack surface entirely with no functional trade-off for builds that use an alternate backend. (2) Enforce cryptographic authentication of all firmware and settings images at the update layer (e.g., MCUboot with image signing) to prevent an untrusted actor from delivering malformed flash content; trade-off is added key management complexity. (3) Use Zephyr's memory domain or partition isolation features to restrict flash write access to the settings partition exclusively to the trusted settings subsystem, preventing co-resident untrusted tasks from planting oversized entries; trade-off is added MPU/MMU configuration effort.
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 (cpe:2.3:a:zephyrproject:zephyr:*:*:*:*:*:*:*:*) is an open-source real-time operating system for constrained embedded and IoT devices. Its settings subsystem supports a Non-Volatile Storage (NVS) backend that persists configuration key-value pairs to flash. The root cause is CWE-787 (Out-of-Bounds Write): the nvs_read() function copies at most min(buffer_len, stored_len) bytes but returns the full stored_len value regardless of buffer capacity. Three call sites in settings_nvs.c - settings_nvs_cache_match(), settings_nvs_load(), and settings_nvs_save() - used that raw return value rc directly as the index for a NUL-termination write (buf[rc] = '\0') against a fixed 74-byte stack buffer, with no prior bounds check. A flash entry whose name length exceeds 74 bytes therefore places a NUL byte at an offset up to the NVS sector size past the buffer end. The fix at commit e79a0db inserts a guard (if ((size_t)rc >= sizeof(buf)) { continue; }) at each of the three sites before the NUL store.
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:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H
Raw flash write access required (AV:L, PR:L); crafting a valid oversized NVS entry demands non-trivial flash knowledge (AC:H); no confidentiality impact per description; availability impact is high due to deterministic crash.
Primary rating from Vendor (zephyr).
CVSS VectorVendor: zephyr
DescriptionCVE.org
The NVS backend of the Zephyr settings subsystem (subsys/settings/src/settings_nvs.c) reads stored setting-name entries into fixed 74-byte stack buffers and NUL-terminates them with buf[rc] = '\0', where rc is the return value of nvs_read(). Per its contract, nvs_read() returns the full stored entry length (wlk_ate.len), which can exceed the supplied buffer length - only MIN(len, stored_len) bytes are actually copied, but the return value may be much larger, bounded only by the NVS sector size. Three sites (settings_nvs_cache_match(), settings_nvs_load(), and settings_nvs_save()) used this value directly as the NUL index without clamping, so an oversized stored name entry causes a single \0 byte to be written past the end of the stack buffer at an attacker-influenced offset (CWE-787).
The oversized entry cannot arise through the normal settings API, where names are bounded by SETTINGS_MAX_NAME_LEN. It requires an actor able to write the flash that backs the settings partition - a co-resident or untrusted component sharing the flash device, a malicious settings image/restore, or offline/physical flash access (a shared-flash threat model). The malformed entry is parsed when settings_load() runs at boot or subsystem init, or during settings_save().
The out-of-bounds write is a single NUL byte at an offset equal to the crafted entry length (up to the NVS sector size), so the practical impact is a crash or denial of service and limited stack corruption rather than reliable code execution. There is no confidentiality impact, and the path is not reachable from the network through the ordinary settings interface. The fix skips any entry whose nvs_read() length is greater than or equal to the buffer size before performing the NUL store.
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.
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.
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-63076
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB