Skip to main content

About CWE-404

MITRE lists these common consequences: DoS: Resource Consumption (Other), Varies by Context, Read Application Data, affecting availability, confidentiality.

MITRE name
Improper Resource Shutdown or Release
Abstraction
Class: a very abstract weakness, typically independent of language or technology
Status
Draft

Mitigations

  • Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • It 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.
  • Memory should be allocated/freed using matching functions such as malloc/free, new/delete, and new[]/delete[].
  • When releasing a complex object or structure, ensure that you properly dispose of all of its member components, not just the object itself.

Detection
MITRE lists these detection methods: Automated Static Analysis (high), Automated Dynamic Analysis (moderate), Manual Dynamic Analysis.

CWE-404 in the KEV Catalog

as of 2026-11-22
All KEV statistics→
  • 6 CISA KEV entries name Improper Resource Shutdown or Release (CWE-404) in their CVE record, tied for 42nd among the 196 weaknesses named in the catalog.
  • Microsoft has the most CWE-404 entries in the CISA KEV catalog (6).

Related Attack Patterns

7 CAPEC patterns
CAPEC-125FloodingMeta · Severity Medium · Likelihood High
CAPEC-130Excessive AllocationMeta · Severity Medium · Likelihood Medium
CAPEC-131Resource Leak ExposureMeta · Severity Medium · Likelihood Medium
CAPEC-666BlueSmackingStandard · Severity Medium · Likelihood Medium
CAPEC-494TCP FragmentationStandard
CAPEC-495UDP FragmentationStandard
CAPEC-496ICMP FragmentationStandard

CWE-404 Vulnerabilities

6 CVEs
CVECVSS
CVE-2018-8639KEV
Microsoft Windows Win32k Improper Resource Shutdown or Release Vulnerability
8.4
CVE-2018-8611KEV
Microsoft Windows Kernel Privilege Escalation Vulnerability
7.8
CVE-2018-8405KEV
Microsoft DirectX Graphics Kernel Privilege Escalation Vulnerability
7.8
CVE-2018-8406KEV
Microsoft DirectX Graphics Kernel Privilege Escalation Vulnerability
7.8
CVE-2018-8120KEV
Microsoft Win32k Privilege Escalation Vulnerability
7.0
CVE-2018-8453KEV
Microsoft Win32k Privilege Escalation Vulnerability
7.8

Frequently Asked Questions

What is CWE-404?→

CWE-404 (Improper Resource Shutdown or Release) is a MITRE CWE entry. The product does not release or incorrectly releases a resource before it is made available for re-use.

How many exploited vulnerabilities are classified as CWE-404?→

This database lists 6 CVE records mapped to CWE-404 by their CVE Numbering Authority. 6 of them are in the CISA Known Exploited Vulnerabilities catalog, and CISA links 5 to known ransomware campaigns. Examples include CVE-2018-8639, CVE-2018-8611, CVE-2018-8405.

Weakness description, consequences, and mitigations from the CWE List, © The MITRE Corporation, used under the CWE Terms of Use. CWE mappings come from each CVE record's CNA. Exploited-in-the-wild data from the CISA KEV catalog (CC0). This site is not affiliated with or endorsed by MITRE or CISA. Attack patterns from CAPEC 3.9, © The MITRE Corporation, used under the CAPEC Terms of Use.