CVE-2026-40257: OP-TEE ARM SHA-3 Crypto Extensions Heap Overflow (CVSS 5.5)
OP-TEE, a Trusted Execution Environment for ARM processors, contains a critical memory corruption bug in its SHA-3 cryptographic implementation when using ARM Crypto Extensions. The vulnerability stems from an off-by-one error in the SHA-3 accelerated code path that triggers a heap overflow, potentially corrupting the entire TEE kernel memory. This affects deployments running OP-TEE versions 3.21.0 through 4.10.x on ARMv8.2+ platforms with SHA3 Crypto Extensions enabled. Organizations must upgrade to version 4.11.0 or disable the affected acceleration feature.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.5 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-787
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-07-06 / 2026-07-07
NVD description (verbatim)
OP-TEE is a Trusted Execution Environment (TEE) designed as companion to a non-secure Linux kernel running on Arm; Cortex-A cores using the TrustZone technology. Starting in version 3.21.0 and prior to version 4.11.0, the ARM Crypto Extensions accelerated SHA-3 implementation has an off-by-one error that can cause a massive heap overflow that corrupts all TEE kernel memory following the hash state. This affects all platforms built with `CFG_CRYPTO_WITH_CE82=y` (ARMv8.2+ with SHA3 Crypto Extensions). Version 4.11.0 contains a patch. As a workaround, disable SHA3 Crypto Extensions with `CFG_CRYPTO_WITH_CE82=n`.
1 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability resides in OP-TEE's ARM Crypto Extensions (CE) accelerated SHA-3 implementation, specifically affecting systems built with the CFG_CRYPTO_WITH_CE82=y configuration flag. An off-by-one error in buffer boundary calculations allows a heap overflow that corrupts memory immediately following the SHA-3 hash state structure. Because the TEE kernel manages cryptographic operations and sensitive data, unrestricted heap corruption in this context can compromise confidentiality and integrity of trusted services and their secrets. The issue was introduced in version 3.21.0 and resolved in 4.11.0.
Business impact
This vulnerability impacts the security posture of any system relying on OP-TEE for trusted execution, including IoT devices, enterprise ARM-based platforms, and mobile systems leveraging TrustZone. While the CVSS score reflects a local attack vector (requiring prior access to the system), successful exploitation leads to arbitrary memory corruption within the TEE, potentially exposing cryptographic keys, sensitive data, or enabling further privilege escalation within the trusted domain. Organizations deploying OP-TEE as a security boundary should treat this as a mandatory patch event.
Affected systems
OP-TEE versions 3.21.0 through 4.10.x running on ARMv8.2 or newer processors with SHA3 Crypto Extensions enabled (CFG_CRYPTO_WITH_CE82=y). This includes embedded systems, SoCs, and development boards using modern ARM architecture. Systems with older ARMv8.0/8.1 or those that disabled the CE82 configuration flag are unaffected.
Exploitability
The vulnerability requires local code execution with user-level privileges to trigger the SHA-3 accelerated code path. While not remotely exploitable by default, it can be weaponized by local processes or applications calling OP-TEE's cryptographic services. No public exploit code has been disclosed, and the CVSS assessment reflects the local-only attack surface (AV:L) and requirement for prior system access (PR:L).
Remediation
Upgrade OP-TEE to version 4.11.0 or later as the primary mitigation. For environments unable to patch immediately, disable ARM Crypto Extensions acceleration by setting CFG_CRYPTO_WITH_CE82=n during TEE build and redeploying. This workaround trades performance for security and should be temporary pending a patched deployment.
Patch guidance
Apply OP-TEE version 4.11.0 or any subsequent release. Verify the build configuration in your deployed TEE matches the patch level, as OP-TEE is typically integrated into SoC firmware or bootloader binaries rather than updated independently. Coordinate patching with your SoC vendor or platform maintainer to obtain updated firmware images, test in a staging environment, and plan a controlled rollout to production devices. Confirm post-deployment that CFG_CRYPTO_WITH_CE82=y remains enabled (unless intentionally disabled as a workaround) to validate the patch was correctly applied.
Detection guidance
Monitor for crashes or memory corruption events within the TEE kernel, which may manifest as unexpected resets or TEE service failures. Enable debug logging in OP-TEE if available in your deployment to capture heap corruption indicators. Audit your build configurations to identify systems running affected versions and CFG_CRYPTO_WITH_CE82=y. Network-level detection is not feasible given the local-only attack vector; focus on inventory and configuration baseline reviews.
Why prioritize this
Although CVSS 5.5 appears moderate, the integrity of the TEE as a security boundary is fundamental to overall system trust. Heap corruption in the TEE kernel can bypass cryptographic protections, expose key material, or enable privilege escalation to the secure world. Organizations should prioritize this upgrade because: (1) it affects the foundation of secure execution on ARM platforms, (2) the workaround introduces measurable performance penalties, and (3) patching requires coordinated firmware updates that may necessitate device downtime.
Risk score, explained
CVSS 3.1 score of 5.5 (MEDIUM) reflects a local attack vector (AV:L), low attack complexity (AC:L), and requirement for user-level privileges (PR:L), resulting in high availability impact (A:H) but no direct confidentiality or integrity rating in the base vector. However, this scoring does not fully capture the strategic importance of TEE integrity; in practice, heap corruption in the secure world often enables further attacks. Security teams should consider context-specific factors: the criticality of OP-TEE to their device security model, the installed base of affected hardware, and the feasibility of patching.
Frequently asked questions
Can this vulnerability be exploited remotely?
No. The CVSS vector AV:L indicates a local attack vector, meaning an attacker must already have code execution on the device. Remote exploitation is not possible without chaining this to a separate remote code execution vulnerability.
If I disable CFG_CRYPTO_WITH_CE82, am I fully protected?
Yes, disabling ARM Crypto Extensions acceleration prevents the vulnerable code path from being executed. However, this workaround should be temporary; it reduces TEE cryptographic performance and is no substitute for upgrading to version 4.11.0 once patched firmware is available.
How do I verify my deployment is affected?
Check your OP-TEE version and build configuration. If you are running 3.21.0 through 4.10.x and built with CFG_CRYPTO_WITH_CE82=y on ARMv8.2+, you are affected. Your SoC vendor or OP-TEE distribution documentation should document the build flags used.
What happens if the heap overflow is triggered?
The off-by-one error causes a write beyond the SHA-3 hash state buffer, corrupting adjacent heap structures. This can crash the TEE kernel, corrupt cryptographic material, or enable exploitation by crafted cryptographic operations. Impact depends on what data structures follow the hash state in memory layout.
This analysis is based on published vulnerability data as of the date provided and represents SEC.co's assessment. CVE details, patch availability, and affected product versions should be verified against official vendor advisories and your specific deployment configuration before taking action. OP-TEE is typically embedded in firmware; patching requires coordination with your device manufacturer or SoC vendor. This document does not constitute legal or compliance advice. Always test patches in a non-production environment before deployment. Source: NVD (public-domain), retrieved 2026-08-15. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2025-10238MEDIUMThinkPad BIOS Out-of-Bounds Write, SMM Code Execution Risk
- CVE-2025-59614MEDIUMQualcomm Memory Corruption in RNG Command Handling
- CVE-2026-10114MEDIUMOpen5GS Out-of-Bounds Write in NF Profile Parser
- CVE-2026-10644MEDIUMZephyr SERCOM-G1 UART Out-of-Bounds Write on PIC32CM-JH
- CVE-2026-10999MEDIUMGoogle Chrome ANGLE Integer Overflow Information Disclosure
- CVE-2026-11090MEDIUMChrome ANGLE Memory Leak Enables Cross-Origin Data Theft
- CVE-2026-12298MEDIUMMemory Safety Vulnerability in Firefox and Thunderbird
- CVE-2026-12528MEDIUM389 Directory Server Heap Buffer Overflow in ACI Parsing