---
title: "CWE-244: Improper Clearing of Heap Memory Before Release"
url: https://radicalnotion.ai/cwe/cwe-244
type: cwe
description: "The product uses realloc() to resize buffers that contain sensitive information."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-244: Improper Clearing of Heap Memory Before Release

- **Abstraction:** Variant
- **Structure:** Simple
- **Status:** Draft
- **CVEs with this as primary weakness:** 23
- **Of those, in CISA KEV:** 1
- **New in 2026:** 8
- **CWE catalog version:** 4.21

## Description

The product uses realloc() to resize buffers that contain sensitive information.

## Background

The realloc() function is commonly used to increase the size of a block of allocated memory. This operation often requires copying the contents of the old memory block into a new and larger block.

## Alternate terms

- Heap Inspection

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |

## Applicable platforms

**Languages:** Memory-Unsafe (Undetermined), C (Undetermined), C++ (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Other | Read Memory, Other | - |

## Detection methods

### Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

## Demonstrative examples

### Example 1

The following code calls realloc() on a buffer containing sensitive data:

Bad code:

```c
cleartext_buffer = get_secret();...
cleartext_buffer = realloc(cleartext_buffer, 1024);
...
scrub_memory(cleartext_buffer, 1024);
```

There is an attempt to scrub the sensitive data from memory, but realloc() is used, so it could return a pointer to a different part of memory. The memory that was originally allocated for cleartext\_buffer could still contain an uncleared copy of the data.

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2019-3733 | Cryptography library does not clear heap memory before release |

## Real CVEs with this weakness (sample of 12 of 23)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-20349 | Cisco Secure Firewall Adaptive Security Appliance and Secure Firewall Threat Defense Software Remote Access SSL VPN Denial of Service Vulnerability | high | 8.6 | - | Yes | 2026-08-11 |
| CVE-2026-20039 | Cisco Adaptive Security Appliance and Firepower Threat Defense Software SSL VPN Authentication Denial of Service Vulnerability | high | 8.6 | - | No | 2026-03-04 |
| CVE-2025-26305 | - | high | 8.2 | - | No | 2025-02-20 |
| CVE-2025-26304 | - | high | 8.2 | - | No | 2025-02-20 |
| CVE-2025-70873 | sqlite: SQLite: Information Disclosure via Crafted ZIP File | high | 7.5 | - | No | 2026-03-12 |
| CVE-2025-1722 | Multiple Vulnerabilities in IBM Concert Software | high | 7.5 | - | No | 2026-01-20 |
| CVE-2025-1719 | Multiple Vulnerabilities in IBM Concert Software | high | 7.5 | - | No | 2026-01-20 |
| CVE-2025-1721 | BM Concert Software Improper Clearing of Heap Memory Before Release. | high | 7.5 | - | No | 2025-12-26 |
| CVE-2025-36118 | IBM Storage Virtualize Information Disclosure | high | 7.5 | - | No | 2025-11-17 |
| CVE-2025-1759 | IBM Concert Software information disclosure | high | 7.5 | - | No | 2025-08-18 |
| CVE-2026-48025 | nebula-mesh: Decrypted CA private key persists in heap after signing | medium | 6.9 | - | No | 2026-07-28 |
| CVE-2025-5105 | TOZED ZLT W51 Service Port 7777 heap inspection | medium | 6.9 | - | No | 2025-05-23 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-226](https://radicalnotion.ai/cwe/cwe-226) | Sensitive Information in Resource Not Removed Before Reuse |
| Can precede | [CWE-669](https://radicalnotion.ai/cwe/cwe-669) | Incorrect Resource Transfer Between Spheres |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| 7 Pernicious Kingdoms | Heap Inspection | - | - |
| CERT C Secure Coding | Clear sensitive information stored in reusable resources returned for reuse | MEM03-C | - |
| Software Fault Patterns | Exposed Data | SFP23 | - |

## Frequently asked questions

### What is CWE-244?

The product uses realloc() to resize buffers that contain sensitive information.

### What CVEs are caused by CWE-244?

23 recorded CVEs are attributed to CWE-244, including CVE-2026-20349, CVE-2026-20039 and CVE-2025-26305. 1 is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

### How is CWE-244 detected?

Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

### What are the consequences of CWE-244?

Exploiting CWE-244 can lead to: Read Memory, Other.

### Is CWE-244 actively exploited?

Yes. 1 CWE-244 vulnerability is in CISA's KEV catalog of actively exploited flaws, out of 23 recorded CVEs.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/244.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-244). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
