# CVE-2023-41325: OP-TEE double free in shdr\_verify\_signature

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.4
- **CVSS:** 7.4 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: High; User interaction: Required; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.35% (percentile 21, 2026-11-26)
- **CWE:** CWE-415
- **Published:** 2023-09-15T19:40:58.065Z
- **Modified:** 2026-06-17T06:21:47.243Z

## Who should check

- Anyone running OP-TEE optee\_os \>= 3.20, \< 3.22

## 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.20 and prior to version 3.22, \`shdr\_verify\_signature\` can make a double free. \`shdr\_verify\_signature\` used to verify a TA binary before it is loaded. To verify a signature of it, allocate a memory for RSA key. RSA key allocate function (\`sw\_crypto\_acipher\_alloc\_rsa\_public\_key\`) will try to allocate a memory (which is optee’s heap memory). RSA key is consist of exponent and modulus (represent as variable \`e\`, \`n\`) and it allocation is not atomic way, so it may succeed in \`e\` but fail in \`n\`. In this case sw\_crypto\_acipher\_alloc\_rsa\_public\_key\` will free on \`e\` and return as it is failed but variable ‘e’ is remained as already freed memory address . \`shdr\_verify\_signature\` will free again that memory (which is \`e\`) even it is freed when it failed allocate RSA key. A patch is available in version 3.22. No known workarounds are available.

## Affected and fixed versions

- OP-TEE optee\_os: \>= 3.20, \< 3.22 (cvelist)

## Mitigation

- Upgrade optee\_os to 3.22 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-41325. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-41325.md
Affected: OP-TEE optee_os >= 3.20, < 3.22
Fixed in: OP-TEE optee_os 3.22

Steps:
1. Search this machine and project for OP-TEE optee_os: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-41325 being exploited?

There is no confirmed exploitation: CVE-2023-41325 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.35% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-41325?

High: CVSS 7.4 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2023-41325?

OP-TEE optee\_os \>= 3.20, \< 3.22.

### Is there a fix for CVE-2023-41325?

Yes. Fixed in OP-TEE optee\_os 3.22. Upgrade optee\_os to 3.22 or later.

### How do I check if I'm affected by CVE-2023-41325?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/OP-TEE/optee_os/security/advisories/GHSA-jrw7-63cq-7vhm>
- patch: <https://github.com/OP-TEE/optee_os/commit/e2ec831cb07ed0099535c7c140cb6338aa62816a>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-41325>

HTML: <https://flawdb.com/CVE-2023-41325> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-41325>
