Mbed TLS and TF-PSA-Crypto Buffer Overflow Vulnerability in FFDH Public Key Export

Vulnerability

A buffer overflow vulnerability has been identified in Mbed TLS versions prior to 3.6.6 and in TF-PSA-Crypto 1.0.0. The issue arises during the export of public keys for Finite Field Diffie-Hellman (FFDH) keys, where the `psa_export_public_key()` function fails to properly validate the size of the output buffer. This oversight allows an attacker to overflow the buffer by supplying a smaller-than-necessary output buffer, potentially leading to memory corruption and arbitrary code execution.

Impact

Exploitation of this vulnerability causes memory corruption, which may allow for arbitrary code execution.

Remediation

Users should upgrade to Mbed TLS 3.6.6 or TF-PSA-Crypto 1.1.0. For those maintaining a branch with backported bug fixes, relevant commits are available.

Added: Apr 1, 2026, 6:27 PM
Updated: Apr 1, 2026, 6:27 PM

Vulnerability Rating

Custom Algorithm
spread
8.6
impact
10.0
exploitability
4.6
remediation
7.7
relevance
5.1
threat
0.0
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.