CVE-2024-45158: n/a
An issue was discovered in Mbed TLS 3.6 before 3.6.1. A stack buffer overflow in mbedtls_ecdsa_der_to_raw() and mbedtls_ecdsa_raw_to_der() can occur when the bits parameter is larger than the largest supported curve. In some configurations with PSA disabled, all values of bits are affected. (This never happens in internal library calls, but can affect applications that call these functions directly.)
AI Analysis
Technical Summary
CVE-2024-45158 is a critical security vulnerability identified in Mbed TLS versions before 3.6.1, involving a stack-based buffer overflow in the elliptic curve digital signature algorithm (ECDSA) DER-to-raw and raw-to-DER conversion functions: mbedtls_ecdsa_der_to_raw() and mbedtls_ecdsa_raw_to_der(). The vulnerability arises when the 'bits' parameter passed to these functions exceeds the size of the largest supported elliptic curve, causing the functions to write beyond the allocated stack buffer. This issue is particularly relevant in configurations where PSA (Platform Security Architecture) is disabled, as in such cases, all values of 'bits' can trigger the overflow. The flaw does not manifest during internal library calls, but applications that directly call these functions with crafted inputs are at risk. Exploitation could lead to arbitrary code execution, memory corruption, or denial of service due to stack smashing. The vulnerability has a CVSS v3.1 base score of 9.8, reflecting its critical severity, with attack vector being network, no privileges required, no user interaction needed, and impacts on confidentiality, integrity, and availability. Although no exploits have been reported in the wild yet, the severity and ease of exploitation make it a significant threat. The root cause is a classic CWE-121 (stack-based buffer overflow) due to insufficient bounds checking on input parameters. Mitigation requires updating to Mbed TLS 3.6.1 or later where the issue is fixed.
Potential Impact
The vulnerability poses a severe risk to organizations relying on Mbed TLS for cryptographic operations, particularly those using ECDSA signature conversions in their applications. Successful exploitation can lead to arbitrary code execution, allowing attackers to compromise the confidentiality and integrity of sensitive data, or cause denial of service by crashing affected services. This can undermine secure communications, authentication mechanisms, and data protection in environments such as IoT devices, embedded systems, and network appliances that embed Mbed TLS. Given the network attack vector and lack of required privileges or user interaction, attackers can remotely exploit this flaw to gain control over vulnerable systems. This could lead to widespread compromise in critical infrastructure, financial services, telecommunications, and any sector using vulnerable cryptographic libraries. The absence of known exploits in the wild currently provides a window for proactive mitigation before active attacks emerge.
Mitigation Recommendations
Organizations should immediately identify all systems and applications using Mbed TLS versions prior to 3.6.1, especially those that directly invoke mbedtls_ecdsa_der_to_raw() or mbedtls_ecdsa_raw_to_der(). The primary mitigation is to upgrade to Mbed TLS 3.6.1 or later, where the vulnerability is patched. For environments where immediate upgrade is not feasible, review application code to ensure these functions are not called directly with untrusted or unchecked 'bits' parameters. Enable PSA support if possible, as it restricts the affected code paths. Implement strict input validation and bounds checking on parameters passed to cryptographic functions. Employ runtime protections such as stack canaries, address space layout randomization (ASLR), and control flow integrity (CFI) to reduce exploitation risk. Monitor network traffic for anomalous patterns that could indicate attempts to exploit this vulnerability. Finally, maintain up-to-date threat intelligence to respond rapidly if exploits emerge.
Affected Countries
United States, China, Germany, South Korea, Japan, United Kingdom, France, India, Canada, Australia
CVE-2024-45158: n/a
Description
An issue was discovered in Mbed TLS 3.6 before 3.6.1. A stack buffer overflow in mbedtls_ecdsa_der_to_raw() and mbedtls_ecdsa_raw_to_der() can occur when the bits parameter is larger than the largest supported curve. In some configurations with PSA disabled, all values of bits are affected. (This never happens in internal library calls, but can affect applications that call these functions directly.)
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2024-45158 is a critical security vulnerability identified in Mbed TLS versions before 3.6.1, involving a stack-based buffer overflow in the elliptic curve digital signature algorithm (ECDSA) DER-to-raw and raw-to-DER conversion functions: mbedtls_ecdsa_der_to_raw() and mbedtls_ecdsa_raw_to_der(). The vulnerability arises when the 'bits' parameter passed to these functions exceeds the size of the largest supported elliptic curve, causing the functions to write beyond the allocated stack buffer. This issue is particularly relevant in configurations where PSA (Platform Security Architecture) is disabled, as in such cases, all values of 'bits' can trigger the overflow. The flaw does not manifest during internal library calls, but applications that directly call these functions with crafted inputs are at risk. Exploitation could lead to arbitrary code execution, memory corruption, or denial of service due to stack smashing. The vulnerability has a CVSS v3.1 base score of 9.8, reflecting its critical severity, with attack vector being network, no privileges required, no user interaction needed, and impacts on confidentiality, integrity, and availability. Although no exploits have been reported in the wild yet, the severity and ease of exploitation make it a significant threat. The root cause is a classic CWE-121 (stack-based buffer overflow) due to insufficient bounds checking on input parameters. Mitigation requires updating to Mbed TLS 3.6.1 or later where the issue is fixed.
Potential Impact
The vulnerability poses a severe risk to organizations relying on Mbed TLS for cryptographic operations, particularly those using ECDSA signature conversions in their applications. Successful exploitation can lead to arbitrary code execution, allowing attackers to compromise the confidentiality and integrity of sensitive data, or cause denial of service by crashing affected services. This can undermine secure communications, authentication mechanisms, and data protection in environments such as IoT devices, embedded systems, and network appliances that embed Mbed TLS. Given the network attack vector and lack of required privileges or user interaction, attackers can remotely exploit this flaw to gain control over vulnerable systems. This could lead to widespread compromise in critical infrastructure, financial services, telecommunications, and any sector using vulnerable cryptographic libraries. The absence of known exploits in the wild currently provides a window for proactive mitigation before active attacks emerge.
Mitigation Recommendations
Organizations should immediately identify all systems and applications using Mbed TLS versions prior to 3.6.1, especially those that directly invoke mbedtls_ecdsa_der_to_raw() or mbedtls_ecdsa_raw_to_der(). The primary mitigation is to upgrade to Mbed TLS 3.6.1 or later, where the vulnerability is patched. For environments where immediate upgrade is not feasible, review application code to ensure these functions are not called directly with untrusted or unchecked 'bits' parameters. Enable PSA support if possible, as it restricts the affected code paths. Implement strict input validation and bounds checking on parameters passed to cryptographic functions. Employ runtime protections such as stack canaries, address space layout randomization (ASLR), and control flow integrity (CFI) to reduce exploitation risk. Monitor network traffic for anomalous patterns that could indicate attempts to exploit this vulnerability. Finally, maintain up-to-date threat intelligence to respond rapidly if exploits emerge.
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- mitre
- Date Reserved
- 2024-08-22T00:00:00.000Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 699f6ce8b7ef31ef0b56a0f2
Added to database: 2/25/2026, 9:43:04 PM
Last enriched: 2/28/2026, 6:51:44 AM
Last updated: 4/12/2026, 3:46:17 PM
Views: 14
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.