CVE-2025-54764
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.
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
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 Medium
CVSS: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 Medium
CVSS: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 Medium
CVSS: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 Medium
CVSS: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 Medium
CVSS: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 Medium
CVSS: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 Medium
CVSS: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 allpsa_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 whenMBEDTLS_RSA_NO_CRTis enabled and all ofN,E,D,PandQhave been set before callingmbedtls_rsa_complete().) (Note: internal uses ofmbedtls_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:
- 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 ofmbedtls_mpi_inv_mod(). - 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()andmbedtls_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 Medium
CVSS: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 Medium
CVSS: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
| Package | Affected | Fixed |
|---|---|---|
mbedtlsAlpine:v3.20 |
before 3.6.5-r0 | 3.6.5-r0 |
mbedtlsAlpine:v3.21 |
before 3.6.5-r0 | 3.6.5-r0 |
mbedtlsAlpine:v3.22 |
before 3.6.5-r0 | 3.6.5-r0 |
mbedtlsAlpine:v3.23 |
before 3.6.5-r0 | 3.6.5-r0 |
mbedtlsAlpine:v3.24 |
before 3.6.5-r0 | 3.6.5-r0 |
mbedtls3Alpine:v3.24 |
before 3.6.5-r0 | 3.6.5-r0 |
mbedtlsDebian: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 less2.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 |
mbedtlsDebian:13 |
before 3.6.5-0.1~deb13u1, plus listed versions 3.6.4-2 |
3.6.5-0.1~deb13u1 |
mbedtlsDebian: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_jllJulia |
All versions | None known |
Show 8 moreShow less
| Package | Affected | Fixed |
|---|---|---|
mbedtlsUbuntu: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 |
mbedtlsUbuntu: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 |
mbedtlsUbuntu: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 |
mbedtlsUbuntu: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 |
mbedtlsUbuntu: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 |
mbedtlsUbuntu:25.10 |
All versions, plus listed versions 3.6.2-3ubuntu1 |
None known |
mbedtlsopenSUSE:Tumbleweed From an advisory covering 2 CVEs |
before 3.6.5-1.1 | 3.6.5-1.1 |
mbedtlsopenSUSE:Leap 16.0 From an advisory covering 15 CVEs |
before 3.6.6-bp160.1.1 | 3.6.6-bp160.1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | OSV | |
| affected | ||
| facts | NVD | |
| affected | OSV | |
| first indexed | CVE 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
mbed-tls.readthedocs.io/en/latest/tech-updates/security-advisories
mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2025-10-ssbleed-mstep
nvd.nist.gov/vuln/detail/CVE-2025-54764
github.com/advisories/GHSA-6237-9hpw-gcm6
security.alpinelinux.org/vuln/CVE-2025-54764
github.com/CVEProject/cvelistV5/tree/main/cves/2025/54xxx/CVE-2025-54764.json
Show 34 moreShow less
security-tracker.debian.org/tracker/CVE-2025-54764
ubuntu.com/security/CVE-2025-54764
cve.org/CVERecord?id=CVE-2025-54764
github.com/Mbed-TLS/mbedtls/compare/8f4779c6fa40374f88404787bebad85cc7e9969b..eb346801263ba4612b5e29633bd55fe18943ca65
github.com/Mbed-TLS/mbedtls/compare/9b54f934588bc373f3c3f5d45b5a3ad0ae003082..99270322ffac3546f813b1069fd6efb667cdce3f
github.com/Mbed-TLS/mbedtls/compare/246d86b941ef2d2bdeabd7035efe7200bc609b91..a08faf90700e46f6aa2a6e3fee8a6a71ddb816ce
github.com/Mbed-TLS/mbedtls/compare/246d86b941ef2d2bdeabd7035efe7200bc609b91..30f073236922fe4e528fdf82eb442babb50516fa
suse.com/security/cve/CVE-2025-54764
suse.com/security/cve/CVE-2025-59438
bugzilla.suse.com/1231708
bugzilla.suse.com/1240051
bugzilla.suse.com/1240052
bugzilla.suse.com/1245808
bugzilla.suse.com/1245809
bugzilla.suse.com/1245810
bugzilla.suse.com/1245811
bugzilla.suse.com/1246783
bugzilla.suse.com/1246784
bugzilla.suse.com/1246973
bugzilla.suse.com/1252341
bugzilla.suse.com/1252454
suse.com/security/cve/CVE-2024-49195
suse.com/security/cve/CVE-2025-27809
suse.com/security/cve/CVE-2025-27810
suse.com/security/cve/CVE-2025-47917
suse.com/security/cve/CVE-2025-48965
suse.com/security/cve/CVE-2025-49087
suse.com/security/cve/CVE-2025-49600
suse.com/security/cve/CVE-2025-49601
suse.com/security/cve/CVE-2025-52496
suse.com/security/cve/CVE-2025-52497
suse.com/security/cve/CVE-2026-25833
suse.com/security/cve/CVE-2026-25834
suse.com/security/cve/CVE-2026-25835
Left out here: the rest of 1 source description. The JSON record has them.