Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessLocal access to device flash and ITS-writing app
-
DeliveryTrigger concurrent same-UID ITS writes
-
ExploitRace yields duplicate AEAD nonce
-
ExecutionRead raw log-structured backing store
-
ImpactRecover XOR of secret plaintexts / forge GCM entries
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Nonce/key pair uniqueness
|
| Exploitation Conditions | Exploitation requires ALL of: (1) an application that writes the SAME ITS UID concurrently from two or more threads - the ITS layer (secure_storage_its_set) performs no serialization, so this reaches the racy provider directly, but it is a non-default application coding pattern; (2) use of the default AEAD nonce provider secure_storage_its_transform_aead_get_nonce() with AES-GCM or ChaCha20-Poly1305; (3) one of the shipped log-structured back-ends (zms.c or the settings/NVS store), whose deferred garbage collection leaves both superseded and new ciphertexts readable simultaneously in the raw partition; and (4) an adversary with the ability to read the raw backing flash image. Limiting factors: the race window is narrow (AC:H), access is local (AV:L, PR:L), and per-UID key salting (DEVICE_ID_HASH / ENTRY_UID_HASH) makes nonce reuse across DIFFERENT UIDs harmless - only same-UID concurrent collisions are security-relevant. |
| Impact | This is a genuine but heavily gated cryptographic flaw, not an internet-facing emergency. The CVSS 3.1 vector (AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N = 5.3 Medium) is internally consistent with the description: exploitation is local (AV:L) because it requires code running on-device plus the ability to read the raw flash backing store, high-complexity (AC:H) because it depends on winning a narrow thread race on same-UID concurrent writes, and requires low privilege (PR:L). Confidentiality is high (C:H - nonce reuse leaks the XOR of two secret plaintexts, including PSA persistent keys) with limited integrity impact (I:L - GCM auth-key exposure enabling forgery of stored entries) and no availability impact. No EPSS score, KEV listing, or public POC was provided, so the real-world exploitation signal is essentially absent; per precision rules this is 'no public exploit identified at time of analysis.' The signals are consistent rather than conflicting: a medium CVSS, no active-exploitation evidence, a narrow multi-condition trigger, and a shipped vendor patch all point to a low operational priority. The dominant limiting factor is that the vulnerable behavior only manifests in applications that concurrently write the SAME ITS UID from two threads - a non-default coding pattern - so most Zephyr deployments are not exposed even after accounting for the crypto severity. |
| Exploit ScenarioDerived | An embedded application uses PSA Internal Trusted Storage and, by design or accident, writes the same UID from two threads at once; the racy nonce provider hands both AES-GCM/ChaCha20-Poly1305 operations the same nonce under the per-UID key. Because both back-ends (zms.c and settings/NVS) are log-structured with deferred garbage collection, both ciphertexts remain physically present in the flash partition, so an attacker who can read the raw backing image recovers the XOR of the two plaintexts and, for GCM, the authentication key enabling forgery. No public exploit code was identified, and the attack requires local flash-read access plus a favorable race window (CVSS AV:L/AC:H). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 21, 2026
Concurrent writes to the same Internal Trusted Storage (ITS) UID in Zephyr RTOS can be encrypted with a duplicate AEAD nonce, because the default nonce provider secure_storage_its_transform_aead_get_nonce() keeps its counter in unsynchronized function-local statics (no lock). Affected are builds using the PSA ITS secure-storage transform with AES-GCM or ChaCha20-Poly1305, an application that writes the same UID from two threads at once, and one of the shipped log-structured back-ends (zms.c or the settings/NVS store) whose deferred garbage collection leaves both racing ciphertexts resident in the raw partition. The impact is cryptographic rather than direct code execution: nonce reuse under the same derived key leaks the XOR of the two plaintexts (potentially PSA persistent keys stored in ITS) and, for GCM, exposes the authentication key, allowing forgery of stored entries - but only for an adversary with local read access to the raw backing flash, and only where the same UID is written concurrently. CVSS is 5.3 (AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N), no CISA KEV listing, and no public exploit identified at time of analysis; risk is heavily gated by the narrow race window and the per-UID key salting that makes cross-UID collisions harmless. An upstream fix commit that serializes the provider with a mutex is available.
RemediationAI
Apply the upstream fix (commit dc66397309248271df1fd0131d68ce8ea62bf91b, referenced from vendor advisory GHSA-23jw-7xv2-xr28), which wraps secure_storage_its_transform_aead_get_nonce() in a static K_MUTEX_DEFINE(s_nonce_mutex) held across nonce generation and converts the early-return error paths to a goto exit that releases the lock - this is the authoritative resolution and should be backported to any maintained Zephyr branch in use. Where patching is not immediately possible, the highest-value compensating control is to eliminate the triggering pattern at the application layer: serialize all ITS writes for a given UID through a single writer thread or a per-UID mutex so two threads never call secure_storage_its_set() for the same UID concurrently; the trade-off is added latency and the need to audit every ITS writer in the application, with any missed concurrent writer leaving the flaw live. Because exploitation also requires an adversary to read the raw backing flash, enabling flash encryption/secure storage protection and disabling or authenticating debug/JTAG access reduces the impact, at the cost of key provisioning complexity, irreversible device-fusing on some SoCs, and reduced field-debuggability; these are mitigations, not fixes, and do not prevent the nonce collision itself. Note that the per-UID key salting (DEVICE_ID_HASH and ENTRY_UID_HASH) already limits the blast radius to same-UID collisions, so workloads that never write the same UID from multiple threads - the default application coding pattern - are not exposed. No vendor patch version number beyond the fix commit was supplied, so validate the patched tree against the advisory rather than assuming a specific release tag.
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
The flaw is a classic CWE-323 (Reusing a Nonce, Key Pair in Encryption) instance inside Zephyr's PSA Internal Trusted Storage transform layer. subsys/secure_storage/src/its/transform/aead_get.c implements secure_storage_its_transform_aead_get_nonce(), the default AEAD nonce provider invoked for every ITS write via secure_storage_its_transform_to_store(). The counter state lives in two file-scope-like, function-local statics (s_nonce and s_nonce_initialized) that are mutated without any lock: one thread may take the initialization path (psa_generate_random() followed by memcpy()) while another takes the non-atomic increment-then-copy path, so two distinct encryptions can be handed the same nonce and increments can be lost, causing the counter to revisit values it was designed never to repeat. Because secure_storage_its_set() in subsys/secure_storage/src/its/implementation.c performs no serialization of its own, concurrent same-UID writes reach the racy provider directly. Under AES-GCM or ChaCha20-Poly1305, nonce reuse with the same key is catastrophic: it reveals the XOR of the two plaintexts and, in the GCM case, the GHASH authentication key, permitting forgery of stored ITS entries (which routinely hold PSA persistent keys). Exploitability depends on the storage layout: both shipped back-ends (zms.c and the settings/NVS back-end) are log-structured flash stores with deferred garbage collection, so a superseded entry remains physically readable until its sector is reclaimed - meaning two same-UID writes that race leave both ciphertexts simultaneously present in the raw image. The attack surface is constrained by key derivation: both built-in providers (DEVICE_ID_HASH and ENTRY_UID_HASH) salt the key with the entry UID, so nonce reuse across different UIDs is harmless and only same-UID collisions matter. The fix (commit dc66397309248271df1fd0131d68ce8ea62bf91b) adds <zephyr/kernel.h> and a static K_MUTEX_DEFINE(s_nonce_mutex) held for the duration of nonce generation, with the error paths converted to a goto exit that unlocks before returning.
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:H/I:L/A:N
Local flash-read access and on-device code give AV:L/PR:L; winning the same-UID nonce race is AC:H; leaked plaintext secrets are C:H, GCM forgery is I:L, no availability impact.
Primary rating from Vendor (zephyr).
CVSS VectorVendor: zephyr
DescriptionCVE.org
The default AEAD nonce provider for the PSA Internal Trusted Storage transform module, secure_storage_its_transform_aead_get_nonce() in subsys/secure_storage/src/its/transform/aead_get.c, stores its nonce counter in unsynchronized function-local static variables (s_nonce and s_nonce_initialized). Every ITS write obtains its AES-GCM or ChaCha20-Poly1305 nonce here via secure_storage_its_transform_to_store().
Because the function held no lock, two threads calling it concurrently race on the shared statics: the initialization path (psa_generate_random() followed by memcpy()) and the non-atomic increment-then-copy path can each hand the same nonce value to two distinct encryption operations, and can lose increments so the counter repeats values it was designed never to repeat. The ITS layer (secure_storage_its_set() in subsys/secure_storage/src/its/implementation.c) performs no serialization of its own, so concurrent same-UID writes reach the racy provider directly.
Reusing a nonce with the same key under AES-GCM or ChaCha20-Poly1305 is a catastrophic AEAD failure: it leaks the XOR of the two plaintexts (ITS routinely stores secrets, including PSA persistent keys) and, for GCM, exposes the authentication key, enabling forgery of stored entries. Because the AEAD key is derived per entry UID, the security-relevant collision is two concurrent writes to the same UID both receiving the same nonce; an adversary able to read the raw backing storage can then exploit the reuse.
Both ITS store back-ends shipped with Zephyr, zms.c and the settings/NVS back-end in settings.c, are log-structured flash stores with deferred garbage collection, so an entry superseded by a rewrite remains physically present in the partition until its sector is reclaimed. Two same-UID writes that race therefore leave both ciphertexts readable in the raw image at once, which is the condition the nonce reuse needs to be exploitable. The trigger remains narrow: both built-in key providers (DEVICE_ID_HASH and ENTRY_UID_HASH) salt the derived key with the entry UID, so reuse across different UIDs is harmless, and the exposure requires an application that writes the same UID concurrently from two threads.
The fix serializes the provider with a K_MUTEX_DEFINE(s_nonce_mutex) held for the duration of nonce generation.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Race conditions occur when multiple concurrent requests exploit the brief time gap between checking a condition and acting upon it (TOCTOU - Time of Check, Time of Use).
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-84178
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB