CWEweakness
CWE-226 Sensitive Information in Resource Not Removed Before Reuse
- Abstraction
- Base
- Structure
- Simple
- Status
- Draft
- Languages
- Not Language-Specific
- CWE version
- 5.0
Description
The product releases a resource such as memory or a file so that it can be made available for reuse, but it does not clear or "zeroize" the information contained in the resource before the product performs a critical state transition or makes the resource available for reuse by other entities.
Extended description
When resources are released, they can be made available for reuse. For example, after memory is de-allocated, an operating system may make the memory available to another process, or disk space may be reallocated when a file is deleted. Since removing information requires time and additional resources, operating systems do not usually clear the previously written information.
Even when the resource is reused by the same process, this weakness can arise when new data is not as large as the old data, which leaves portions of the old data still available. Equivalent errors can occur in other situations where the length of data is variable but the associated data structure is not. If memory is not cleared after use, the information may be read by less trustworthy parties when the memory is reallocated.
This weakness can apply in hardware, such as when a device or system switches between power, sleep, or debug states during normal operation, or when execution changes to different users or privilege levels.
Common consequences
• Confidentiality: Read Application Data
Potential mitigations
• [Architecture and Design, Implementation] During critical state transitions, information not needed in the next state should be removed or overwritten with fixed patterns (such as all 0's) or random data, before the transition to the next state.
• [Architecture and Design, Implementation] When releasing, de-allocating, or deleting a resource, overwrite its data and relevant metadata with fixed patterns or random data. Be cautious about complex resource types whose underlying representation might be non-contiguous or change at a low level, such as how a file might be split into different chunks on a file system, even though "logical" file positions are contiguous at the application layer. Such resource types might require invocation of special modes or APIs to tell the underlying operating system to perform the necessary clearing, such as SDelete (Secure Delete) on Windows, although the appropriate functionality might not be available at the application layer.
• [Implementation] Be careful using vfork() and fork() in security sensitive code. The process state will not be cleaned up and will contain traces of data from past use.
Detection methods
• Manual Analysis: Write a known pattern into each sensitive location. Trigger the release of the resource or cause the desired state transition to occur. Read data back from the sensitive locations. If the reads are successful, and the data is the same as the pattern that was originally written, the test fails and the product needs to be fixed. Note that this test can likely be automated.
• 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.)
Observed examples
• CVE-2019-3733: Cryptography library does not clear heap memory before release
• CVE-2003-0001: Ethernet NIC drivers do not pad frames with null bytes, leading to infoleak from malformed packets.
• CVE-2003-0291: router does not clear information from DHCP packets that have been previously used
• CVE-2005-1406: Products do not fully clear memory buffers when less data is stored into the buffer than previous.
• CVE-2005-1858: Products do not fully clear memory buffers when less data is stored into the buffer than previous.
• CVE-2005-3180: Products do not fully clear memory buffers when less data is stored into the buffer than previous.
• CVE-2005-3276: Product does not clear a data structure before writing to part of it, yielding information leak of previously used memory.
• CVE-2002-2077: Memory not properly cleared before reuse.
Related
Attack pattern · CAPEC (1)
- CAPEC-37 Retrieve Embedded Sensitive Data attack pattern
Observed example · CVE (8)
- CVE-2019-3733 RSA BSAFE Crypto-C Micro Edition, all versions prior to 4.1.4, is vulnerable to three (3) different Improper Clearing of Heap Memory Before… vulnerability
- CVE-2005-3276 The sys_get_thread_area function in process.c in Linux 2.6 before 2.6.12.4 and 2.6.13 does not clear a data structure before copying it to… vulnerability
- CVE-2005-3180 The Orinoco driver (orinoco.c) in Linux kernel 2.6.13 and earlier does not properly clear memory from a previously used packet whose length… vulnerability
- CVE-2005-1858 FUSE 2.x before 2.3.0 does not properly clear previously used memory from unfilled pages when the filesystem returns a short byte count to… vulnerability
- CVE-2005-1406 The kernel in FreeBSD 4.x to 4.11 and 5.x to 5.4 does not properly clear certain fixed-length buffers when copying variable-length data for… vulnerability
- CVE-2003-0291 3com OfficeConnect Remote 812 ADSL Router 1.1.7 does not properly clear memory from DHCP responses, which allows remote attackers to… vulnerability
- CVE-2003-0001 Multiple ethernet Network Interface Card (NIC) device drivers do not pad frames with null bytes, which allows remote attackers to obtain… vulnerability
- CVE-2002-2077 The DCOM client in Windows 2000 before SP3 does not properly clear memory before sending an "alter context" request, which may allow remote… vulnerability
Can precede · CWE (1)
- CWE-201 Insertion of Sensitive Information Into Sent Data weakness
Child of · CWE (2)
Referenced by CAPEC · weakness (1)
- CAPEC-37 Retrieve Embedded Sensitive Data attack pattern
Referenced by CVE · weakness (40)
- CVE-2026-114501 Pillow is a Python imaging library. vulnerability
- CVE-2026-107315 pgjdbc, the PostgreSQL JDBC Driver, versions 42.7.4 through 42.7.13 pads a value that is shorter than its declared length with bytes left… vulnerability
- CVE-2026-106111 ImageSharp is a 2D graphics library. vulnerability
- CVE-2026-92708 Svelte devalue is a JavaScript library that serializes values into strings when JSON.stringify isn't sufficient for the job. vulnerability
- CVE-2026-18023 Sensitive Information in Resource Not Removed Before Reuse in ASUS Armoury Crate driver allows a local user to disclose sensitive… vulnerability
- CVE-2026-74791 Scriban before 7.0.0 fails to clear the CachedTemplates dictionary when TemplateContext.Reset() is called, allowing cached templates to… vulnerability
- CVE-2026-74250 In OpenStack Ironic before 38.0.1, the autodetect deploy interface may fail to run cleaning immediately after enrollment with, or changing… vulnerability
- CVE-2026-47247 libheif is a HEIF and AVIF file format decoder and encoder. vulnerability
- CVE-2026-13585 Allocation of Resources Without Limits and Throttling and Sensitive Information in Resource Not Removed Before Reuse in the ASUS System… vulnerability
- CVE-2026-48984 pam_usb provides hardware authentication for Linux using ordinary removable media. vulnerability
- CVE-2026-32960 SD-330AC and AMC Manager provided by silex technology, Inc. vulnerability
- CVE-2026-5795 In Eclipse Jetty, the class JASPIAuthenticator initiates the authentication checks, which set two ThreadLocal variable. vulnerability
- CVE-2025-14858 The Semtech LR11xx LoRa transceivers running early versions of firmware contains an information disclosure vulnerability in its firmware… vulnerability
- CVE-2019-25657 AnyBurn 4.3 x86 contains a denial of service vulnerability that allows local attackers to crash the application by supplying an excessively… vulnerability
- CVE-2019-25645 WinAVI iPod/3GP/MP4/PSP Converter 4.4.2 contains a denial of service vulnerability that allows local attackers to crash the application by… vulnerability
- CVE-2019-25617 Ease Audio Converter 5.30 contains a denial of service vulnerability in the Audio Cutter function that allows local attackers to crash the… vulnerability
- CVE-2019-25553 CEWE PHOTO IMPORTER 6.4.3 contains a denial of service vulnerability that allows local attackers to crash the application by importing a… vulnerability
- CVE-2019-25560 Lyric Video Creator 2.1 contains a denial of service vulnerability that allows attackers to crash the application by processing malformed… vulnerability
- CVE-2019-25563 PCHelpWareV2 1.0.0.5 contains a denial of service vulnerability that allows local attackers to crash the application by supplying a… vulnerability
- CVE-2019-25571 MediaMonkey 4.1.23 contains a denial of service vulnerability that allows local attackers to crash the application by opening a specially… vulnerability
- CVE-2025-13108 IBM DB2 Merge Backup for Linux, UNIX and Windows 12.1.0.0 could allow an attacker to access sensitive information in memory due to the… vulnerability
- CVE-2025-0647 In certain Arm CPUs, a CPP RCTX instruction executed on one Processing Element (PE) may inhibit TLB invalidation when a TLBI is issued to… vulnerability
- CVE-2025-33196 NVIDIA DGX Spark GB10 contains a vulnerability in SROOT firmware, where an attacker could cause a resource to be reused. vulnerability
- CVE-2025-33198 NVIDIA DGX Spark GB10 contains a vulnerability in SROOT firmware, where an attacker could cause a resource to be reused. vulnerability
- CVE-2025-33200 NVIDIA DGX Spark GB10 contains a vulnerability in SROOT firmware, where an attacker could cause a resource to be reused. vulnerability
- CVE-2025-20622 Sensitive information uncleared in resource before release for reuse for some Intel(R) NPU Drivers for Windows before version 32.0.100.4023… vulnerability
- CVE-2025-11602 Potential information leak in bolt protocol handshake in Neo4j Enterprise and Community editions allows attacker to obtain one byte of… vulnerability
- CVE-2025-2522 The Honeywell Experion PKS and OneWireless WDM contains Sensitive Information in Resource vulnerability in the component Control Data… vulnerability
- CVE-2025-48066 wire-webapp is the web application for the open-source messaging service Wire. vulnerability
- CVE-2024-21850 Sensitive information in resource not removed before reuse in some Intel(R) TDX Seamldr module software before version 1.5.02.00 may allow… vulnerability
Referenced by CWE · child of (4)
- CWE-1272 Sensitive Information Uncleared Before Debug/Power State Transition weakness
- CWE-1301 Insufficient or Incomplete Data Removal within Hardware Component weakness
- CWE-1342 Information Exposure through Microarchitectural State after Transient Execution weakness
- CWE-244 Improper Clearing of Heap Memory Before Release weakness
Referenced by CWE · has member (1)
- CWE-1432 Weaknesses in the 2025 CWE Most Important Hardware Weaknesses List view