Cross-session AES key confusion in Espressif ESP32 hardware crypto driver
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- Low · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA.
Summary
Zephyr from 4.3.0 before 4.3.2 and from 4.4.0 before 4.5.0 has a race condition in the Espressif ESP32 hardware AES crypto driver. The driver programs the chip-global AES key and direction registers once at session start, outside the lock that serializes operations, so a second session with a different key can change the key used by the first. An attacker who can induce session creation on the device, such as a protocol peer, can influence which key is resident when a victim operation runs. Exploitation requires an application that holds concurrent sessions with different keys, and the impact is a cryptographic failure in which data is processed under the wrong key.
Written with Claude Haiku 5.5 from the sources below · 2026-11-04
Description from the CNA
The Espressif AES driver drivers/crypto/crypto_esp32_aes.c advertises a multi-session cipher API — it hands out up to CONFIG_ESP32_CRYPTO_AES_SESSIONS_MAX (default 4) independent sessions, each carrying its own key and direction. The AES peripheral, however, has a single chip-global set of key and mode registers, and aes_begin_session() programmed them exactly once, at session start, outside the aes_lock mutex that serialises the transforms. The per-operation handlers aes_ecb_op(), aes_cbc_op() and aes_ctr_op() then ran aes_hal_transform_block() against whatever key and direction the registers happened to hold. As a result, once a second session is opened with a different key, every subsequent operation on the first session silently uses the second session's key and direction, and no error is reported. Because the key programming happened outside the lock, the correct usage pattern of "each thread does begin, then op, then free on its own session" also races: a second thread's cipher_begin_session() landing between the first thread's begin and its operation makes that operation run under the second thread's key. An attacker who can induce session creation on the device — for example a protocol peer whose connection causes a session key to be installed — can influence which key is resident when a victim operation runs. The impact is a cryptographic failure rather than memory corruption: data the application believed it was protecting under one key is encrypted or decrypted under another. Where the resident key is one the attacker knows or supplied, the affected plaintext becomes recoverable by that attacker, and the operation's direction (encrypt versus decrypt) can likewise be inverted. Exposure requires an application that holds two or more concurrent sessions with different keys against this driver; no in-tree Zephyr subsystem does so today (the 802.15.4 security layer, which does open two sessions, uses CCM mode, which this driver rejects), so the risk falls on application code that uses the documented multi-session API. The fix removes all hardware access from aes_begin_session() and reprograms the key and direction at the top of every operation, inside aes_lock, so the chip-global registers can no longer be observed stale by another session.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| zephyrproject | zephyr | 4.3.0 to before 4.3.2; 4.4.0 to before 4.5.0 | 4.3.2, 4.5.0 | Patch available | CNA |
- zephyr Vendorzephyrproject Affected 4.3.0 to before 4.3.2; 4.4.0 to before 4.5.0 Fixed in 4.3.2, 4.5.0 Patch available CNA
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:zephyrproject:zephyr:*:*:*:*:*:*:*:* | — | — | zephyrproject |
- cpe:2.3:o:zephyrproject:zephyr:*:*:*:*:*:*:*:* Versions — — ·zephyrproject
Remediation
Upgrade zephyrproject zephyr to 4.3.2 or later, or to 4.5.0 or later. Both versions fix the issue.
Written with Claude Haiku 5.5 from the sources below · 2026-11-04
- Fix · CNA zephyr (zephyrproject) Fixed in 4.3.2, 4.5.0
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
zephyrproject zephyr 4.3.2, 4.5.0
4 records Highest priority Priority LOW 4 LOW
Other records, highest priority first
- TI-2026-80477 Bluetooth OTS server leaks uninitialized stack memory in ZephyrPriority LOW 30
- TI-2026-80478 Bluetooth Host connection reservation leak when multiple connectable advertising sets share an identityPriority LOW 19
- TI-2026-80474 IPv6 interface identifiers derived from a predictable random key in ZephyrPriority LOW 17
Timeline
- 2026-10-26 Threatist record created from CVE-2026-82390
- 2026-10-26 CISA SSVC decision points changed
- 2026-11-04 Fix available: [email protected], [email protected] · CNA
References
Patch 1
Other 1
More zephyrproject vulnerabilities
- TI-2026-04422 Out-of-bounds read/write in HTTP WebSocket upgrade via non-null-terminated Sec-WebSocket-Key CVSS 3.1CRITICAL 9.8
- TI-2026-01361 dns: memory‑safety issue in the DNS name parser CVSS 3.1CRITICAL 9.8
- TI-2026-09174 Unterminated URI buffer causes out-of-bounds read in LwM2M firmware pull (Package URI) CVSS 3.1CRITICAL 9.1
- TI-2026-09168 Stack buffer overflow in `net_ipaddr_parse()` IPv4 address-with-port parsing in `subsys/net/ip/utils.c` CVSS 3.1CRITICAL 9.8
- TI-2024-09625 net: lib: http_server: Buffer Under-read CVSS 3.1HIGH 8.6
- TI-2021-02863 Usb bluetooth device ACL read cb buffer overflow CVSS 3.1CRITICAL 9.6
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences