CVE-2021-44732
Critical · 9.8CVSS
9.8
EPSS
2.8%
Published
Dec 20, 2021
CISA due date
—
Cloudanix analysis
A secure connection library could crash or be taken over by attackers when the system runs low on memory during certain operations.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Double free in mbedtls_ssl_set_session under specific out-of-memory conditions leading to heap corruption or process crash.
Why it matters to the business
Remote attackers could crash or potentially take over services using the library, causing outages or unauthorized access with moderate urgency due to low EPSS and no known ransomware use after nearly five years.
How an attack unfolds
An attacker initiates an SSL/TLS connection and forces an out-of-memory scenario during session handling in mbedtls_ssl_set_session, triggering the double free to corrupt memory and achieve code execution or denial of service.
How to fix it
Upgrade Mbed TLS to 3.0.1 or later (GIT commit 8b3f26a5ac38d4fdccbc5c5366229f3e01dafcc0); for Debian tiff packages on versions 11/12/13 upgrade to 3.7.2-3.
How to confirm the fix worked
Verify installed version against fixed releases or commit hashes; test mbedtls_ssl_set_session under simulated OOM conditions to confirm absence of double free.
Typical attack path
- Establish TLS connection to target service
- Trigger memory pressure to induce OOM during mbedtls_ssl_set_session
- Trigger double free to corrupt heap structures
- Leverage corruption for arbitrary code execution or crash
How to detect it
Review application and system logs for repeated mbedtls_ssl_set_session failures accompanied by out-of-memory or heap corruption indicators; inspect crash dumps for double-free signatures in TLS session code paths.
What your security team should do
- Apply updates to Mbed TLS 3.0.1+ or Debian tiff 3.7.2-3 immediately on all affected systems
- Scan dependency trees for embedded mbedtls copies and rebuild where needed
- Monitor EPSS trend and exploit availability for any increase in activity
The record
Mbed TLS before 3.0.1 has a double free in certain out-of-memory conditions, as demonstrated by an mbedtls_ssl_set_session() failure.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.12 | mbedtls | 0 | 2.16.12-r0 |
| Alpine:v3.13 | mbedtls | 0 | 2.16.12-r0 |
| Alpine:v3.14 | mbedtls | 0 | 2.16.12-r0 |
| Alpine:v3.15 | mbedtls | 0 | 2.16.12-r0 |
| Alpine:v3.16 | mbedtls | 0 | 2.16.12-r0 |
| Alpine:v3.17 | mbedtls | 0 | 2.16.12-r0 |
| Alpine:v3.18 | mbedtls | 0 | 2.16.12-r0 |
| Alpine:v3.19 | mbedtls | 0 | 2.16.12-r0 |
| Alpine:v3.20 | mbedtls | 0 | 2.16.12-r0 |
| Alpine:v3.21 | mbedtls | 0 | 2.16.12-r0 |
| Alpine:v3.22 | mbedtls | 0 | 2.16.12-r0 |
| Debian:10 | mbedtls | 0 | 2.16.9-0~deb10u1 |
| Debian:11 | mbedtls | 0 | No fix |
| Debian:12 | mbedtls | 0 | 2.28.0-0.3 |
| Debian:13 | mbedtls | 0 | 2.28.0-0.3 |
| Debian:14 | mbedtls | 0 | 2.28.0-0.3 |
| Mageia:8 | mbedtls | 0 | 2.16.12-1.mga8 |
| Ubuntu:16.04:LTS | mbedtls | 0 | No fix |
| Ubuntu:18.04:LTS | mbedtls | 0 | No fix |
| Ubuntu:20.04:LTS | mbedtls | 0 | No fix |
| Ubuntu:22.04:LTS | mbedtls | 0 | No fix |
| Ubuntu:24.04:LTS | mbedtls | 0 | No fix |
| Ubuntu:24.10 | mbedtls | 0 | No fix |
| Ubuntu:25.04 | mbedtls | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | mbedtls | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | mbedtls | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | mbedtls | 0 | No fix |
Related vulnerabilities
- CVE-2024-28960 An issue was discovered in Mbed TLS 2.18.0 through 2.28.x before 2.28.8 and 3.x before… Also affects mbedtls
- CVE-2024-23775 Integer Overflow vulnerability in Mbed TLS 2.x before 2.28.7 and 3.x before 3.5.2, allows… Also affects mbedtls
- CVE-2024-23170 An issue was discovered in Mbed TLS 2.x before 2.28.7 and 3.x before 3.5.2. Also affects mbedtls
- CVE-2023-43615 Mbed TLS 2.x before 2.28.5 and 3.x before 3.5.0 has a Buffer Overflow. Also affects mbedtls
- CVE-2022-35409 An issue was discovered in Mbed TLS before 2.28.1 and 3.x before 3.2.0. Also affects mbedtls
- CVE-2024-45157 An issue was discovered in Mbed TLS before 2.28.9 and 3.x before 3.6.1, in which the… Also affects mbedtls
- JLSEC-2025-187 Mbed TLS before 2.28.10 and 3.x before 3.6.3, in some cases of failed memory allocation… Also affects mbedtls
- CVE-2024-49195 Mbed TLS 3.5.x through 3.6.x before 3.6.2 has a buffer underrun in pkwrite when writing… Also affects mbedtls