Cloudanix VulnDB

CVE-2021-44732

Critical · 9.8

CVSS

9.8

EPSS

2.8%

Published

Dec 20, 2021

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A secure connection library could crash or be taken over by attackers when the system runs low on memory during certain operations.

Exploit Available
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

  1. Establish TLS connection to target service
  2. Trigger memory pressure to induce OOM during mbedtls_ssl_set_session
  3. Trigger double free to corrupt heap structures
  4. 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