CyberSecBulletin
CVE-2025-52496NVD status: Modified

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.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update mbedtls to 3.6.4 or a later version.
  2. Update Mbed TLS to 3.6.4 or a later version.
  3. Read the advisory on github.com for workarounds and exact fixed builds.

Affected products and versions

VendorProductAffected versionsFixed in
Mbedmbedtlsbefore 3.6.43.6.4
ArmMbed TLSbefore 3.6.43.6.4

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 systemScoreSeverityScored by
CVSS 3.17.8HighCNA (mitre.org)
CVSS 3.17.8HighNVD

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.

More Compiler Optimization Removal or Modification of Security-critical Code vulnerabilities (CWE-733)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: poc, automatable: no, technical impact: total).
  3. Record last changed materially (score, affected products, status or references).

References

Other vulnerabilities in mbedtls

All mbedtls vulnerabilities

Spotted an error? Tell us.