An issue was discovered in Mbed TLS 3.5.x and 3.6.x through 3.6.5 and TF-PSA-Crypto 1.0. There is a lack of contributory behavior in FFDH due to improper input validation. Using finite-field Diffie-Hellman, the other party can force the shared secret into a small set of values (lack of contributory behavior). This is a problem for protocols that depend on contributory behavior (which is not the case for TLS). The attack can be carried by the peer, or depending on the protocol by an active network attacker (person in the middle).
During FFDH key exchange, each party should provide an independent, random contribution to the shared secret (contributory behavior). Due to the lack of proper validation of input data transmitted by the other party, an attacking peer or active network attacker can send a crafted public key, forcing the resulting shared secret to derive from only a very small, predictable set of values. This significantly reduces the security of key exchange in protocols that assume full randomness of both parties' contributions. The attack does not affect the TLS protocol itself, but other protocols using FFDH through these libraries.
An attacker can learn or narrow the scope of a shared cryptographic secret, leading to violations of confidentiality and integrity of communications in protocols dependent on contributory behavior in FFDH. Depending on the protocol, the attack can be conducted by either a direct peer or an active network attacker (man-in-the-middle).
Patches available from the vendor should be applied according to the references. Detailed information about available patched versions is available in the official Mbed TLS security advisory: https://mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2026-03-ffdh-peerkey-checks/
Arm Mbed TLS in versions 3.5.x and 3.6.x through 3.6.5 inclusive, as well as Arm TF-PSA-Crypto version 1.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NArm Mbed Tls
APPArm< 3.6.6Arm Tf Psa Crypto
APPArm1.0.0
Related vulnerabilities
RCE przez deserializację kontekstu SSL w Mbed TLS
Przepełnienie bufora sterty w Mbed TLS — DTLS Connection ID
Mbed TLS: heap buffer over-read w obsłudze DTLS ClientHello
Double free w Mbed TLS przy błędach braku pamięci (RCE/DoS)
ARM mbed TLS: integer overflow w parsowaniu PSK identity umożliwia RCE