CWE · MITRE source
CWE-244Improper Clearing of Heap Memory Before Release ('Heap Inspection')
Using realloc() to resize buffers that store sensitive information can leave the sensitive information exposed to attack, because it is not removed from memory.
When sensitive data such as a password or an encryption key is not removed from memory, it could be exposed to an attacker using a "heap inspection" attack that reads the sensitive data using memory dumps or other methods. 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. This operation leaves the contents of the original block intact but inaccessible to the program, preventing the program from being able to scrub sensitive data from memory. If an attacker can later examine the contents of a memory dump, the sensitive data could be exposed.
Last updated: 09 May 2026 03:25 UTC
NIST 800-53 r5 controls that address this weakness (2)AI
| Control | Title | Family | Why it addresses this CWE |
|---|---|---|---|
SC-4 | Information in Shared System Resources | SC | Forces clearing of heap memory contents prior to release, preventing subsequent processes from inspecting prior sensitive data. |
SI-12 | Information Management and Retention | SI | Information management requirements drive clearing of sensitive contents from memory prior to release or reuse. |
Top CVEs of this weakness type, ranked by Risk Priority
| CVE | Risk | CVSS | EPSS | Published |
|---|---|---|---|---|
CVE-2025-26304 | 1.7 | 8.2 | 0.0035 | 2025-02-20 |
CVE-2025-26305 | 1.7 | 8.2 | 0.0032 | 2025-02-20 |
CVE-2026-20039 | 1.7 | 8.6 | 0.0008 | 2026-03-04 |
CVE-2025-5105 | 1.5 | 7.3 | 0.0034 | 2025-05-23 |
CVE-2025-36118 | 1.5 | 7.5 | 0.0004 | 2025-11-17 |
CVE-2025-70873 | 1.5 | 7.5 | 0.0005 | 2026-03-12 |
CVE-2025-45663 | 1.3 | 6.5 | 0.0007 | 2025-11-03 |
CVE-2022-20922 | 1.2 | 5.8 | 0.0029 | 2022-11-15 |
CVE-2022-20943 | 1.2 | 5.8 | 0.0028 | 2022-11-15 |
CVE-2025-33013 | 1.2 | 6.2 | 0.0002 | 2025-07-24 |
CVE-2025-1759 | 1.2 | 5.9 | 0.0005 | 2025-08-18 |
CVE-2025-36083 | 1.2 | 6.2 | 0.0001 | 2025-10-28 |
CVE-2025-1721 | 1.2 | 5.9 | 0.0007 | 2025-12-26 |
CVE-2025-1719 | 1.2 | 5.9 | 0.0006 | 2026-01-20 |
CVE-2025-1722 | 1.2 | 5.9 | 0.0006 | 2026-01-20 |
CVE-2025-33101 | 1.2 | 5.9 | 0.0004 | 2026-02-17 |
CVE-2023-20177 | 0.8 | 4.0 | 0.0001 | 2023-11-01 |
CVE-2023-20031 | 0.8 | 4.0 | 0.0002 | 2023-11-01 |
CVE-2023-20070 | 0.8 | 4.0 | 0.0024 | 2023-11-01 |