CWE•Class•Draft•20 recent CVEs
CWE-404Improper Resource Shutdown or Release
Description
The product does not release or incorrectly releases a resource before it is made available for re-use.
When a resource is created or allocated, the developer is responsible for properly releasing the resource as well as accounting for all potential paths of expiration or invalidation, such as a set period of time or revocation.
Common consequences
- Availability,Other→DoS: Resource Consumption (Other),Varies by ContextMost unreleased resource issues result in general software reliability problems, but if an attacker can intentionally trigger a resource leak, the attacker might be able to launch a denial of service attack by depleting the resource pool.
- Confidentiality→Read Application DataWhen a resource containing sensitive information is not correctly shutdown, it may expose the sensitive data in a subsequent allocation.
Potential mitigations
- Requirements[object Object]
- ImplementationIt is good practice to be responsible for freeing all resources you allocate and to be consistent with how and where you free memory in a function. If you allocate memory that you intend to free upon completion of the function, you must be sure to free the memory at all exit points for that function including error conditions.
- ImplementationMemory should be allocated/freed using matching functions such as malloc/free, new/delete, and new[]/delete[].
- ImplementationWhen releasing a complex object or structure, ensure that you properly dispose of all of its member components, not just the object itself.
Related CWEs
Recent CVEs classified under this CWE
CVE-2026-113123.32026-06-05CVE-2026-108024.32026-06-04CVE-2026-107753.62026-06-03CVE-2026-107053.12026-06-03CVE-2026-106505.32026-06-02CVE-2026-102983.32026-06-01CVE-2026-102953.32026-06-01CVE-2026-102245.32026-06-01CVE-2026-102013.32026-06-01CVE-2026-101993.32026-05-31CVE-2026-101983.32026-05-31CVE-2026-101973.32026-05-31CVE-2026-101906.52026-05-31CVE-2026-101564.32026-05-31CVE-2026-101174.32026-05-30CVE-2026-101164.32026-05-30CVE-2026-101154.32026-05-30CVE-2026-101134.32026-05-30CVE-2026-100697.52026-05-29CVE-2026-450907.52026-05-27