CVE-2026-40257 OP-TEE has SHA-3 accelerated finalize heap overflow

Medium 5.5 Published Updated

An off-by-one error in OP-TEE's SHA-3 implementation allows heap overflow and memory corruption, potentially leading to code execution or privilege escalation.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-40257?

CVE-2026-40257 is a medium-severity memory corruption vulnerability in OP-TEE optee_os, published on 6 Jul 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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`.

Weakness: CWE-787

Which versions are affected by CVE-2026-40257?

It affects 1 product.

Products include Trustedfirmware Op-Tee.

How do I fix CVE-2026-40257?

No fix has been published for CVE-2026-40257 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2026-40257 being exploited?

There is no known exploitation of CVE-2026-40257 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2026-40257, GHSA-75x4-j8p9-55qv, UBUNTU-CVE-2026-40257.

Is CVE-2026-40257 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free