Critical Timing Attack Vulnerability in Mbed TLS Package

mbedtls Updated 02 Oct 2025

Summary

20/07/2025
N/A
Yes i
Low
3.7

CVE-2025-49087: In Mbed TLS 3.6.1 through 3.6.3 before 3.6.4, a timing discrepancy in block cipher padding removal allows an attacker to recover the plaintext when PKCS#7 padding mode is used. Affects mbedtls across 2 version ranges.

< 3.6.4-r0 >= 71c569d44bf3a8bd53d874c81ee8ac644dd6e9e3, < c765c831e5c2a0971410692f92f7a81d6ec65ec2

Fixed in 3.6.4-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Mbed TLS is a widely used cryptographic library designed to facilitate secure communication in various applications. It provides essential cryptographic functions such as encryption, decryption, and secure socket layer (SSL) capabilities. The library is particularly valued for its lightweight design, making it suitable for embedded systems and IoT devices. However, versions 3.6.1 through 3.6.3 of Mbed TLS are vulnerable to a timing attack that can compromise data security when using PKCS#7 padding mode.

Vulnerability Detail

The vulnerability, identified as CVE-2025-49087, arises from a timing discrepancy during the block cipher padding removal process in Mbed TLS. This flaw allows an attacker to exploit the timing differences to recover the plaintext data, posing a significant risk to the confidentiality of sensitive information. The issue is particularly critical for applications relying on PKCS#7 padding mode, as it can lead to unauthorized data exposure and potential breaches.

How To Fix

Minimum fixed version

3.6.4-r0

This is the first release that contains the fix.

sudo apk add --upgrade mbedtls

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate updating is not feasible, consider implementing additional security measures such as input validation and rate limiting to mitigate the risk of timing attacks. However, these are not substitutes for patching the vulnerability.

Conclusion

The timing attack vulnerability in Mbed TLS (CVE-2025-49087) poses a serious risk to applications using affected versions. It is crucial to update to version 3.6.4 or later to ensure the security of sensitive data. Users should also consider utilizing tools like Vulert to monitor for vulnerabilities in their software.

See every vulnerability recorded for mbedtls →

Share this vulnerability

FAQ

CVE-2025-49087 is a vulnerability in Mbed TLS that allows attackers to recover plaintext data through timing discrepancies during block cipher padding removal.

Versions 3.6.1 through 3.6.3 of Mbed TLS are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The vulnerability can lead to unauthorized access to sensitive data, compromising the confidentiality of information transmitted using Mbed TLS.

If an immediate update is not possible, implement additional security measures such as input validation and rate limiting to help mitigate the risks.

Related vulnerabilities

Recent vulnerabilities recorded for mbedtls.

How To Fix

Minimum fixed version

3.6.4-r0

This is the first release that contains the fix.

sudo apk add --upgrade mbedtls

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback