# CVE-2026-12634: Out-of-bounds stack write in the settings NVS backend from over-reported nvs\_read length

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.3
- **CVSS:** 5.3 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: Low; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.14% (percentile 2, 2026-11-26)
- **CWE:** CWE-787
- **Published:** 2026-08-19T20:37:36.742Z
- **Modified:** 2026-11-04T05:18:40.863Z

## Who should check

- Anyone running zephyrproject zephyr \>= 2.0.0, \< 4.3.2; \>= 4.4.0, \< 4.5.0

## Description

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.

## Affected and fixed versions

- zephyrproject zephyr: \>= 2.0.0, \< 4.3.2; \>= 4.4.0, \< 4.5.0 (cvelist)

## Mitigation

- Upgrade zephyr to 4.5.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-12634. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-12634.md
Affected: zephyrproject zephyr >= 2.0.0, < 4.3.2; >= 4.4.0, < 4.5.0
Fixed in: zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.5.0

Steps:
1. Search this machine and project for zephyrproject zephyr: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-12634 being exploited?

There is no confirmed exploitation: CVE-2026-12634 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.14% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-12634?

Medium: CVSS 5.3 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-12634?

zephyrproject zephyr \>= 2.0.0, \< 4.3.2; \>= 4.4.0, \< 4.5.0.

### Is there a fix for CVE-2026-12634?

Yes. Fixed in zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.5.0. Upgrade zephyr to 4.5.0 or later.

### How do I check if I'm affected by CVE-2026-12634?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-q7c8-m2qg-385c>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/e79a0db70fc9ad33982f9786b428b115a78eaadd>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-12634>

HTML: <https://flawdb.com/CVE-2026-12634> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-12634>
