CVE-2024-23775

7.5 HIGH

📋 TL;DR

An integer overflow vulnerability in Mbed TLS's mbedtls_x509_set_extension() function allows attackers to cause denial of service (DoS) by triggering memory corruption. This affects systems using Mbed TLS 2.x before 2.28.7 or 3.x before 3.5.2 for X.509 certificate processing.

💻 Affected Systems

Products:
  • Mbed TLS
Versions: 2.x before 2.28.7, 3.x before 3.5.2
Operating Systems: All platforms running affected Mbed TLS versions
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability triggers when processing X.509 certificates with extensions, which is common in TLS/SSL operations.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service disruption through DoS, potentially leading to application crashes or instability in TLS/SSL operations.

🟠

Likely Case

Service interruption affecting TLS connections, certificate validation failures, and degraded security functionality.

🟢

If Mitigated

Limited impact with proper input validation and memory protection mechanisms in place.

🌐 Internet-Facing: HIGH - Mbed TLS is commonly used in internet-facing services for TLS/SSL operations.
🏢 Internal Only: MEDIUM - Internal services using Mbed TLS for certificate processing could be affected.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires sending specially crafted X.509 certificates to trigger the integer overflow.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.28.7 or 3.5.2

Vendor Advisory: https://mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2024-01-2/

Restart Required: Yes

Instructions:

1. Update Mbed TLS to version 2.28.7 or 3.5.2. 2. Recompile applications using Mbed TLS. 3. Restart affected services.

🔧 Temporary Workarounds

Input Validation

all

Implement strict validation of X.509 certificate extensions before processing.

🧯 If You Can't Patch

  • Implement network segmentation to limit exposure to untrusted certificate sources.
  • Use Web Application Firewall (WAF) rules to filter suspicious certificate data.

🔍 How to Verify

Check if Vulnerable:

Check Mbed TLS version: mbedtls_version_get_string() or check library files.

Check Version:

For applications: Check build configuration or use mbedtls_version_get_string(). For packages: rpm -q mbedtls or dpkg -l libmbedtls*

Verify Fix Applied:

Verify Mbed TLS version is 2.28.7 or higher for 2.x, or 3.5.2 or higher for 3.x.

📡 Detection & Monitoring

Log Indicators:

  • Application crashes related to mbedtls_x509_set_extension
  • TLS handshake failures with malformed certificates

Network Indicators:

  • Unusual certificate sizes or extension data in TLS connections

SIEM Query:

Search for process crashes containing 'mbedtls' or 'x509' in error messages.

🔗 References

📤 Share & Export