Skip to main content

OP-TEE OS CVE-2026-40257

| EUVDEUVD-2026-41891 MEDIUM
Out-of-bounds Write (CWE-787)
2026-07-06 GitHub_M
5.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain low-privileged Linux shell
  2. Delivery
    Invoke OP-TEE Trusted Application session
  3. Exploit
    Trigger SHA-3 hash operation via ARM CE path
  4. Execution
    Off-by-one overflows TEE heap buffer
  5. Persist
    TEE kernel memory corrupted
  6. Impact
    Secure world crash or controlled memory overwrite

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires three concurrent conditions: (1) the target device must have OP-TEE OS built with CFG_CRYPTO_WITH_CE82=y - this is a non-default compile-time flag requiring ARMv8.2+ hardware with SHA3 Crypto Extensions support, so it is not present on all OP-TEE deployments; (2) the attacker must have at least low-privileged code execution on the non-secure Linux side and the ability to invoke an OP-TEE Trusted Application session that exercises the SHA-3 hash path; and (3) the affected version must be in the range 3.21.0 to 4.10.x. Exploitation is limited by: local-only attack vector (AV:L), the build-time opt-in requirement (CFG_CRYPTO_WITH_CE82=y is not universally enabled), and the need for low-privileged OS access prior to TEE interaction. Remote exploitation is not possible without a separate pre-existing remote code execution vulnerability on the Linux host.

Impact

The official CVSS 3.1 score of 5.5 (AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H) captures only the availability dimension, but the described impact - corrupting 'all TEE kernel memory following the hash state' - implies meaningful integrity consequences that C:N/I:N may understate. A heap overflow that corrupts TEE kernel structures could enable code execution within the secure world, which is a significantly elevated risk beyond a simple crash. The local attack vector and low-privilege requirement constrain real-world exposure: an attacker must already have code execution on the non-secure Linux side and must be able to invoke OP-TEE SHA-3 operations. No EPSS data was provided, and this CVE is not listed in CISA KEV, indicating no confirmed active exploitation. The build-time opt-in nature of CFG_CRYPTO_WITH_CE82=y means only deployments explicitly enabling ARM SHA3 Crypto Extensions are vulnerable, substantially reducing the exposed population. Overall, this is a moderate-to-high priority for affected embedded/mobile platform vendors but lower urgency for general enterprise environments.

Exploit ScenarioDerived

An attacker with low-privilege code execution on the Linux non-secure OS (e.g., via an unprivileged shell or compromised application) invokes a Trusted Application in OP-TEE that performs a SHA-3 hash operation. The off-by-one error in the ARM CE-accelerated SHA-3 path triggers a write beyond the hash state buffer, overflowing into adjacent TEE kernel heap memory and corrupting secure-world data structures, potentially crashing the TEE or enabling escalation within the secure world. No public proof-of-concept code has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 06, 2026

Heap overflow in OP-TEE's ARM Crypto Extensions SHA-3 implementation corrupts TEE kernel memory across all platforms built with CFG_CRYPTO_WITH_CE82=y (ARMv8.2+ SHA3 extensions). The off-by-one error in the accelerated SHA-3 path overwrites memory beyond the hash state buffer, potentially corrupting all TEE kernel heap memory that follows. Affected versions span 3.21.0 through 4.11.0, and no public exploit has been identified at time of analysis, though the memory corruption primitive is significant in the context of a secure enclave.

RemediationAI

Upgrade to OP-TEE OS version 4.11.0, which contains the official patch for the off-by-one error in the SHA-3 ARM Crypto Extensions implementation. The vendor advisory is at https://github.com/OP-TEE/optee_os/security/advisories/GHSA-75x4-j8p9-55qv. If upgrading immediately is not possible, rebuild OP-TEE with CFG_CRYPTO_WITH_CE82=n to disable the vulnerable hardware-accelerated SHA-3 path; this trades hardware-accelerated SHA-3 performance for software-only SHA-3 (no functional loss, only throughput regression on SHA-3 workloads). There is no network-level mitigation available given the local attack vector - access control to the Linux userspace that invokes OP-TEE sessions is the only environmental compensating control.

Affected VersionsENISA

optee_os 3.21.0, < 4.11.0

Affected Packages

euvd optee_os_3_21_0 fix: 4.11.0

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

OP-TEE (Open Portable Trusted Execution Environment) is a secure-world OS running on ARM TrustZone-enabled Cortex-A processors alongside a normal Linux kernel. The vulnerability resides in the hardware-accelerated SHA-3 code path enabled when OP-TEE is compiled with CFG_CRYPTO_WITH_CE82=y, targeting ARMv8.2+ platforms that expose the SHA-3 ARM Crypto Extension instructions. CWE-787 (Out-of-Bounds Write) identifies the root cause: an off-by-one miscalculation in the buffer indexing logic causes the SHA-3 state to be written one position beyond the allocated heap buffer. Because TEE heap is contiguous, this corrupts all kernel-managed memory structures following the hash state, which may include cryptographic keys, TA (Trusted Application) contexts, and secure memory mappings. The CPE cpe:2.3:a:op-tee:optee_os:*:*:*:*:*:*:*:* confirms the affected component is the optee_os project.

Know when Optee Os 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

Vendor (GitHub_M) PRIMARY 5.5 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.1 HIGH

Local vector and low privileges confirmed; integrity set to High because heap corruption of TEE kernel memory constitutes a meaningful integrity violation beyond mere crash.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
Patch available
Jul 06, 2026 - 18:02 EUVD
CVE Published
Jul 06, 2026 - 16:26 cve.org
MEDIUM 5.5

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.1%
Top 99% exploitable
Prevalence
Low
specialized ARM TrustZone TEE, primarily embedded and mobile platforms
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

28
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +28
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

CVE-2026-33317 HIGH
8.7 Apr 24

Out-of-bounds read and write in OP-TEE OS PKCS#11 Trusted Application (versions 3.13.0-4.10.0) allows authenticated loca

CVE-2026-71969 HIGH
8.4 Aug 10

Secure-world heap corruption in OP-TEE OS through 4.10.0 allows a malicious Trusted Application to write attacker-contro

CVE-2026-71968 HIGH
8.4 Aug 10

Use-after-free in the OP-TEE OS Trusted Application loader (all versions through 4.10.0) allows an attacker who controls

CVE-2026-40290 HIGH
7.8 Jun 03

Use-after-free race condition in OP-TEE OS versions 3.16.0 through 4.10.x enables local low-privileged attackers to corr

CVE-2026-33662 HIGH
7.5 Apr 24

Integer overflow in OP-TEE OS RSA signature encoding crashes the Trusted Execution Environment on platforms with RSA har

CVE-2026-71967 MEDIUM
5.7 Aug 10

Null pointer dereference in OP-TEE OS through version 4.10.0 allows a low-privileged Normal World process to crash the e

CVE-2026-44362 MEDIUM
5.5 Jul 06

Subkey rollback protection in OP-TEE OS versions 3.20.0 through 4.10.x is completely non-functional due to a missing fie

CVE-2026-45702 MEDIUM
5.5 Jun 03

Type confusion in OP-TEE OS versions 4.3.0 through 4.10.x allows a highly privileged local attacker operating in the nor

CVE-2026-45614 MEDIUM
4.7 Jun 03

Private ECDH key recovery in OP-TEE prior to version 4.11.0 is achievable by a local attacker who can invoke TEE_DeriveK

CVE-2026-53763 LOW
3.8 Jul 06

Integer overflow in OP-TEE OS's AES-GCM implementation silently corrupts authentication tag computation when a single op

CVE-2026-42546 LOW
3.8 Jul 06

Heap exhaustion in OP-TEE OS (versions 3.3.0 through 4.10.x) allows a low-privileged normal-world local caller to progre

CVE-2026-41434 LOW
3.3 Jul 06

Stack exhaustion via unbounded recursion in the OP-TEE PKCS#11 Trusted Application allows a local low-privileged user to

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy