Executive brief
Mbed TLS is a widely used open-source cryptographic library that helps devices communicate securely over the internet. A security flaw has been identified where the library fails to verify memory limits when exporting certain security keys. If exploited, this could allow an attacker to crash the system or potentially take control of the device by executing unauthorized code.
Technical details
A classic buffer overflow (CWE-120) exists in the psa_export_public_key() function within Mbed TLS and TF-PSA-Crypto. The vulnerability is caused by a failure to validate the size of the user-supplied output buffer when exporting Finite Field Diffie-Hellman (FFDH) public keys. If an application provides a buffer smaller than the key size, the function writes past the buffer boundaries, leading to memory corruption. An attacker who can influence the key export process could leverage this to achieve arbitrary code execution or cause a denial of service. The issue is resolved in Mbed TLS 3.6.6 and TF-PSA-Crypto 1.1.0.
Affected products
- TrustedFirmware Mbed TLS 3.5.0 to 3.6.5
- TrustedFirmware TF-PSA-Crypto 1.0.0
Timeline
- 2026-03-31: advisory: Vendor advisory released by Mbed TLS team
- 2026-04-01: disclosed: CVE published to NVD