mbedtls: Compiler Optimization Removal or Modification of Security-critical Code
CVE-2025-52496 is a high-severity compiler optimization removal or modification of security-critical code vulnerability in mbedtls from Mbed, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an unauthenticated attacker, without any action from a user. The record lists version 3.6.4 as the first without the flaw, so updating mbedtls to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.21% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update mbedtls to 3.6.4 or a later version.
- Update Mbed TLS to 3.6.4 or a later version.
- Read the advisory on github.com for workarounds and exact fixed builds.
Affected products and versions
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- HighSuccess depends on conditions outside the attacker's control.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- ChangedThe attack can reach beyond the vulnerable component into other systems.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- NoneAvailability is not affected.
Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.8 | High | CNA (mitre.org) |
| CVSS 3.1 | 7.8 | High | NVD |
Official description
Mbed TLS before 3.6.4 has a race condition in AESNI detection if certain compiler optimizations occur. An attacker may be able to extract an AES key from a multithreaded program, or perform a GCM forgery.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Compiler Optimization Removal or Modification of Security-critical Code
The developer builds a security-critical protection mechanism into the software, but the compiler optimizes the program such that the mechanism is removed or modified.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- github.com/Mbed-TLS/mbedtls-docs/blob/main/security-advisories/mbedtls-security-advisory-2025-06-1.mdExploit, Third Party Advisory
Other references
Other vulnerabilities in mbedtls
- 9.8 Critical severity
- 7.5 High severity
- 9.8 Critical severity
- 8.2 High severity
Spotted an error? Tell us.