Every CVE Search/ Get API key

CVE-2025-54764

Mbed TLS before 3.6.5 allows a local timing attack against certain RSA operations, and direct...

6.2 MediumFix available

Mbed TLS before 3.6.5 allows a local timing attack against certain RSA operations, and direct calls to mbedtls_mpi_mod_inv or mbedtls_mpi_gcd.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
None
Availability
None

Exploit likelihood

0.22%Up 0.2 points since Oct 21, 2025
90%50%10%1%

What each source reports

CVE List Score used 6.2

Mbed TLS before 3.6.5 allows a local timing attack against certain RSA operations, and direct calls to mbedtls_mpi_mod_inv or mbedtls_mpi_gcd.

Record
CVE-2025-54764
CVSS 3.1
6.2 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-208
Updated
2026-11-02
EUVDEUVD-2025-35113 6.2

Mbed TLS before 3.6.5 allows a local timing attack against certain RSA operations, and direct calls to mbedtls_mpi_mod_inv or mbedtls_mpi_gcd.

Record
EUVD-2025-35113
CVSS 3.1
6.2 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-6237-9hpw-gcm6 6.2

Mbed TLS before 3.6.5 allows a local timing attack against certain RSA operations, and direct...

Mbed TLS before 3.6.5 allows a local timing attack against certain RSA operations, and direct calls to mbedtls_mpi_mod_inv or mbedtls_mpi_gcd.

Record
GHSA-6237-9hpw-gcm6
CVSS 3.1
6.2 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-208
Updated
2026-11-02
NVD 6.2

Mbed TLS before 3.6.5 allows a local timing attack against certain RSA operations, and direct calls to mbedtls_mpi_mod_inv or mbedtls_mpi_gcd.

Record
CVE-2025-54764
CVSS 3.1
6.2 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-208
Updated
2026-11-05
OSVALPINE-CVE-2025-54764 6.2

Mbed TLS before 3.6.5 allows a local timing attack against certain RSA operations, and direct calls to mbedtls_mpi_mod_inv or mbedtls_mpi_gcd.

Record
ALPINE-CVE-2025-54764
CVSS 3.1
6.2 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-03
OSV 6.2

Mbed TLS before 3.6.5 allows a local timing attack against certain RSA operations, and direct calls to mbedtls_mpi_mod_inv or mbedtls_mpi_gcd.

Record
CVE-2025-54764
CVSS 3.1
6.2 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-07
Show 5 moreShow less
OSVDEBIAN-CVE-2025-54764 6.2

Mbed TLS before 3.6.5 allows a local timing attack against certain RSA operations, and direct calls to mbedtls_mpi_mod_inv or mbedtls_mpi_gcd.

Record
DEBIAN-CVE-2025-54764
CVSS 3.1
6.2 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-06
OSVJLSEC-2025-232 6.2

Side channel in RSA key generation and operations (SSBleed, M-Step)

Vulnerability

Mbed TLS's modular inversion routine and GCD routine are vulnerable to local timing attacks in a number of settings discussed below.

These functions are used in RSA, making the following operations vulnerable in all configurations:

  • RSA key generation with any API (mbedtls_rsa_gen_key() and all psa_generate_key*() functions).
  • Use of mbedtls_rsa_complete() to import RSA private keys that are incomplete or not in the standard format. (The only exception is when MBEDTLS_RSA_NO_CRT is enabled and all of N, E, D, P and Q have been set before calling mbedtls_rsa_complete().) (Note: internal uses of mbedtls_rsa_complete() in the library are always safe.)

Additionally, if MBEDTLS_RSA_NO_CRT is enabled, the following operations are also vulnerable:

  • Import of RSA key pairs with psa_import_key().
  • Export of RSA key pairs with any key export API (PSA, PK).

Additionally, if MBEDTLS_RSA_NO_CRT and MBEDTLS_USE_PSA_CRYPTO are both enabled, the following operations are also vulnerable:

  • Signature generation with PK (mbedtls_pk_sign(), mbedtls_pk_sign_ext()).
  • Decryption with PK (mbedtls_pk_decrypt()).

Elliptic curve cryptography (ECDSA, ECDH, EC-JPAKE) is not affected as the vulnerable functions are used in a safe way (with blinding).

Finite-field Diffie-Hellman (FFDH) is not affected as it does not use the vulnerable functions.

Direct use of mbedtls_mpi_inv_mod() by applications on secret data is most likely vulnerable unless you use proper blinding.

Direct use of mbedtls_mpi_gcd() by applications on secret data is most likely vulnerable, unless the compiler used has __builtin_ctz (GCC 10 and above has it, earlier versions don't), and it is not implemented using a loop (most architectures have instructions that are more efficient than using a loop).

Impact

When one of the vulnerable RSA functions mentioned above is used, the vulnerability allows the attacker to fully recover the RSA private key.

When mbedtls_mpi_mod_inv() is directly called by an application (or mbedtls_mpi_gcd() in a build where it is affected, see above), the vulnerability allows the attacker to recover both inputs.

Attack settings

The side channels in GCD and modular inversion can be exploited by a local attacker in a number of circumstances. Two teams independently developed tools allowing to trace a victim process, recover the inputs to mbedtls_mpi_mod_inv() and break RSA key generation:

  1. SSBleed: this uses the Memory Dependence Predictor (MDP) on some Arm-v9 CPUs. The attacker only needs to be able to run code on the same core as the victim but does not need elevated privileges. The proof of concept fully recovers RSA private keys from mbedtls_rsa_gen_key() and the same principle applies to other unblinded uses of mbedtls_mpi_inv_mod().
  2. M-Step: in a setting where TrustZone-M is used, the M-Step framework allows the non-secure world to abuse timer interrupts to effectively single-step the secure world and trace its execution flow. The proofs of concepts fully recover RSA private keys from mbedtls_rsa_gen_key() and mbedtls_rsa_complete(). Several other exploitation paths in RSA are identified. In particular, mbedtls_mpi_gcd() is found to be vulnerable when Mbed TLS is compiled with a compiler that does not have __builtin_ctz.

The same functions are most probably also vulnerable in other circumstances using similar attack techniques: SGX-Step, SEV-Step, microarchitectural attacks similar to SSBleed...

Credits

SSBleed: Chang Liu from Tsinghua University and Trevor E. Carlson from National University of Singapore

M-Step: Cristiano Rodrigues (University of Minho), Marton Bognar (DistriNet, KU Leuven), Sandro Pinto (University of Minho), Jo Van Bulck (DistriNet, KU Leuven)

Affected versions

All versions of Mbed TLS up to 3.6.4 are affected.

Work-around

…

Record
JLSEC-2025-232
CVSS 3.1
6.2 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
OSVUBUNTU-CVE-2025-54764 6.2

Mbed TLS before 3.6.5 allows a local timing attack against certain RSA operations, and direct calls to mbedtls_mpi_mod_inv or mbedtls_mpi_gcd.

Record
UBUNTU-CVE-2025-54764
CVSS 3.1
6.2 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Updated
2026-11-02
OSVopenSUSE-SU-2025:15747-1 No score

libeverest-3.6.5-1.1 on GA media

These are all security issues fixed in the libeverest-3.6.5-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2025:15747-1
Updated
2026-11-02
OSVopenSUSE-SU-2026:21144-1 No score

Security update for mbedtls

This update for mbedtls fixes the following issues:

Changes in mbedtls:

  • Update to 3.6.6 (LTS maintenance update from 3.6.1); security fixes accumulated across the 3.6.2-3.6.6 releases:
    • CVE-2024-49195 (boo#1231708): buffer underrun in pkwrite when writing an opaque key pair
    • CVE-2025-27809 (boo#1240051): certificate verification accepted arbitrary hostnames
    • CVE-2025-27810 (boo#1240052): possible authentication bypass on failed memory allocation / hardware errors
    • CVE-2025-47917 (boo#1246783): misleading memory management in mbedtls_x509_string_to_names()
    • CVE-2025-48965 (boo#1246784): NULL pointer dereference after mbedtls_asn1_store_named_data()
    • CVE-2025-49087 (boo#1246973): timing side channel in PKCS#7 padding removal
    • CVE-2025-49600 (boo#1245808): unchecked return values in LMS verification allow signature bypass via fault injection
    • CVE-2025-49601 (boo#1245809): out-of-bounds read in mbedtls_lms_import_public_key()
    • CVE-2025-52496 (boo#1245810): race in AES-NI support detection can lead to AES key extraction or GCM forgery
    • CVE-2025-52497 (boo#1245811): one-byte heap underflow when parsing PEM-encrypted material
    • CVE-2025-54764 (boo#1252341): timing attacks in RSA operations
    • CVE-2025-59438 (boo#1252454): padding-oracle attack via timing of cipher error reporting
    • CVE-2026-25833: PSA RNG state duplicated across fork()
    • CVE-2026-25834: TLS 1.3 HelloRetryRequest man-in-the-middle session-resumption downgrade
    • CVE-2026-25835: RNG state duplicated when application/VM state is cloned
Record
openSUSE-SU-2026:21144-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
mbedtls
Alpine:v3.20
before 3.6.5-r0
3.6.5-r0
mbedtls
Alpine:v3.21
before 3.6.5-r0
3.6.5-r0
mbedtls
Alpine:v3.22
before 3.6.5-r0
3.6.5-r0
mbedtls
Alpine:v3.23
before 3.6.5-r0
3.6.5-r0
mbedtls
Alpine:v3.24
before 3.6.5-r0
3.6.5-r0
mbedtls3
Alpine:v3.24
before 3.6.5-r0
3.6.5-r0
mbedtls
Debian:12
All versions, plus listed versions
2.28.3-12.28.4-12.28.5-12.28.6-12.28.7-1
Show 18 moreShow less
2.28.7-1.12.28.7-1.1~exp12.28.8-13.6.0-13.6.0-23.6.0-33.6.2-13.6.2-23.6.2-33.6.3-13.6.4-13.6.4-23.6.5-0.13.6.5-0.1~deb13u13.6.6-0.13.6.6-0.1~deb13u13.6.7-23.6.7-3
None known
mbedtls
Debian:13
before 3.6.5-0.1~deb13u1, plus listed versions
3.6.4-2
3.6.5-0.1~deb13u1
mbedtls
Debian:14
before 3.6.5-0.1, plus listed versions
3.6.4-23.6.5-0.1~deb13u1
3.6.5-0.1
MbedTLS_jll
Julia
All versions None known
Show 8 moreShow less
Affected packages
PackageAffectedFixed
mbedtls
Ubuntu:16.04:LTS
All versions, plus listed versions
2.1.2-12.2.0-12.2.1-12.2.1-22.2.1-2ubuntu0.12.2.1-2ubuntu0.22.2.1-2ubuntu0.3
None known
mbedtls
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
2.5.1-1ubuntu12.6.0-12.7.0-22.8.0-12.8.0-1ubuntu0.1~esm1
None known
mbedtls
Ubuntu:Pro:20.04:LTS
All versions, plus listed versions
2.16.2-12.16.3-12.16.4-1ubuntu22.16.4-1ubuntu2+esm1
None known
mbedtls
Ubuntu:22.04:LTS
All versions, plus listed versions
2.16.9-0.1ubuntu12.16.11-0.1ubuntu12.16.11-0.32.28.0-12.28.0-1build1
None known
mbedtls
Ubuntu:24.04:LTS
All versions, plus listed versions
2.28.3-12.28.6-1ubuntu12.28.7-1ubuntu12.28.7-1.1ubuntu12.28.8-1
None known
mbedtls
Ubuntu:25.10
All versions, plus listed versions
3.6.2-3ubuntu1
None known
mbedtls
openSUSE:Tumbleweed
From an advisory covering 2 CVEs
before 3.6.5-1.1
3.6.5-1.1
mbedtls
openSUSE:Leap 16.0
From an advisory covering 15 CVEs
before 3.6.6-bp160.1.1
3.6.6-bp160.1.1

History

History
RecordedChangedSources
affectedOSV
affected
factsNVD
affectedOSV
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-54764 is a medium vulnerability (CVSS 6.2) in Arm Mbed Tls, published October 20, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.22%, the 12th percentile. Fixed in mbedtls 3.6.5-r0.

References

Show 34 moreShow less
This page doesn't list everything

Left out here: the rest of 1 source description. The JSON record has them.

MoveEnter Open