Intel

AIKIDO-2025-10217

Mbed-TLS.mbedtls is vulnerable to Stack-based Buffer Overflow

Stack-based Buffer OverflowCVE-2024-45158 Published Apr 8, 2025

81

High Risk

This Affects:

c++Mbed-TLS.mbedtls
3.6.0 - 3.6.0
Fixed in 3.6.1
Are you affected? Scan for Free

TL;DR

In Mbed TLS 3.6.0, the functions mbedtls_ecdsa_der_to_raw() and mbedtls_ecdsa_raw_to_der() are vulnerable to a stack buffer overflow if the bits argument exceeds the maximum curve size, due to missing validation. When MBEDTLS_PSA_CRYPTO_C is disabled, these functions may use a zero-sized internal buffer, leading to overflows even with valid input. This affects applications that invoke these functions on attacker-controlled input, allowing an attacker to trigger a buffer overflow by manipulating the declared curve bit size.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

Mbed-TLS.mbedtls is vulnerable to Stack-based Buffer Overflow in versions 3.6.0 - 3.6.0.

How to fix this

Upgrade the Mbed-TLS.mbedtls library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform