CVE-2026-82390
Received Received - Intake

Race Condition in Espressif AES Driver Enables Key Confusion

Vulnerability report for CVE-2026-82390, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-26

Last updated on: 2026-10-26

Assigner: Zephyr Project

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-26
Last Modified
2026-10-26
Generated
2026-10-26
AI Q&A
2026-10-26
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
zephyrproject zephyr 4.3.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-362 The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is a cross-session AES key confusion flaw in the Espressif ESP32 hardware crypto driver within Zephyr RTOS. The driver allows multiple sessions with different keys, but the AES hardware uses a single set of registers. The key programming happens outside a mutex lock, causing operations to use the wrong key if another session is created concurrently. This leads to data being encrypted or decrypted with an unintended key.

Detection Guidance

Detection requires checking for applications using the Espressif ESP32 AES driver in Zephyr RTOS with multiple concurrent sessions. Inspect Zephyr project logs for errors in crypto operations or unexpected key usage. No direct network detection commands exist, but system logs may reveal mismatched encryption/decryption keys during operations.

Impact Analysis

An attacker who can induce session creation on the device may influence which key is active during cryptographic operations. This could allow them to decrypt data encrypted under a different key or reverse the encryption/decryption direction. The impact is a loss of data confidentiality rather than memory corruption.

Compliance Impact

This vulnerability could lead to unauthorized access to sensitive data, violating confidentiality requirements in GDPR and HIPAA. If encrypted data is decrypted with an unintended key, it may expose protected health information or personal data, resulting in compliance breaches and potential legal consequences.

Mitigation Strategies

Upgrade Zephyr RTOS to version 4.5.0 or later, which includes the patch. If upgrading is not possible, backport the fix from the Zephyr commit cb4168ab3f6bd1bfc26060fd33cfcd00e8e641f1. Ensure no custom applications use multiple concurrent AES sessions with different keys until patched.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-82390. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart