Incomplete Cleanup |
Weakness ID: 459 (Weakness Base) | Status: Draft |
Description Summary
Example 1
Stream resources in a Java application should be released in a finally block, otherwise an exception thrown before the call to close() would result in an unreleased I/O resource. In the example below, the close() method is called in the try block (incorrect).
Reference | Description |
---|---|
CVE-2000-0552 | World-readable temporary file not deleted after use. |
CVE-2005-2293 | Temporary file not deleted after use, leaking database usernames and passwords. |
CVE-2002-0788 | Interaction error creates a temporary file that can not be deleted due to strong permissions. |
CVE-2002-2066 | Alternate data streams for NTFS files are not cleared when files are wiped (alternate channel / infoleak). |
CVE-2002-2067 | Alternate data streams for NTFS files are not cleared when files are wiped (alternate channel / infoleak). |
CVE-2002-2068 | Alternate data streams for NTFS files are not cleared when files are wiped (alternate channel / infoleak). |
CVE-2002-2069 | Alternate data streams for NTFS files are not cleared when files are wiped (alternate channel / infoleak). |
CVE-2002-2070 | Alternate data streams for NTFS files are not cleared when files are wiped (alternate channel / infoleak). |
CVE-2005-1744 | Users not logged out when application is restarted after security-relevant changes were made. |
Temporary files and other supporting resources should be deleted/released immediately after they are no longer needed. |
Temporary files should be deleted as soon as possible. If a file contains sensitive information, the longer it exists the better the chance an attacker has to gain access to its contents. Also it is possible to overflow the number of temporary files because directories typically have limits on the number of files allowed, which could create a denial of service problem. Overlaps other categories. Concept needs further development. This could be primary (e.g. leading to infoleak) or resultant (e.g. resulting from unhandled error condition or early termination). Overlaps other categories such as permissions and containment. |
Nature | Type | ID | Name | View(s) this relationship pertains to![]() |
---|---|---|---|---|
ChildOf | ![]() | 404 | Improper Resource Shutdown or Release | Research Concepts (primary)1000 |
ChildOf | ![]() | 452 | Initialization and Cleanup Errors | Development Concepts (primary)699 |
ChildOf | ![]() | 731 | OWASP Top Ten 2004 Category A10 - Insecure Configuration Management | Weaknesses in OWASP Top Ten (2004) (primary)711 |
ParentOf | ![]() | 226 | Sensitive Information Uncleared Before Release | Research Concepts (primary)1000 |
ParentOf | ![]() | 460 | Improper Cleanup on Thrown Exception | Research Concepts (primary)1000 |
CWE-459 is a child of CWE-404 because, while CWE-404 covers any type of improper shutdown or release of a resource, CWE-459 deals specifically with a multi-step shutdown process in which a crucial step for "proper" cleanup is omitted or impossible. That is, CWE-459 deals specifically with a cleanup or shutdown process that does not successfully remove all potentially sensitive data. |
Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
---|---|---|---|
PLOVER | Incomplete Cleanup | ||
OWASP Top Ten 2004 | A10 | CWE More Specific | Insecure Configuration Management |
Submissions | ||||
---|---|---|---|---|
Submission Date | Submitter | Organization | Source | |
PLOVER | Externally Mined | |||
Modifications | ||||
Modification Date | Modifier | Organization | Source | |
2008-07-01 | Sean Eidemiller | Cigital | External | |
added/updated demonstrative examples | ||||
2008-07-01 | Eric Dalci | Cigital | External | |
updated Time of Introduction | ||||
2008-09-08 | CWE Content Team | MITRE | Internal | |
updated Relationships, Other Notes, Taxonomy Mappings | ||||
2009-05-27 | CWE Content Team | MITRE | Internal | |
updated Relationship Notes, Relationships |