Incomplete CleanupID: 459 | Date: (C)2012-05-14 (M)2022-10-10 |
Type: weakness | Status: DRAFT |
Abstraction Type: Base |
Description
The software does not properly "clean up" and remove temporary
or supporting resources after they have been used.
Applicable PlatformsLanguage Class: All
Time Of Introduction
- Architecture and Design
- Implementation
Common Consequences
Scope | Technical Impact | Notes |
---|
OtherConfidentialityIntegrity | OtherRead application
dataModify application
data | |
Detection MethodsNone
Potential Mitigations
Phase | Strategy | Description | Effectiveness | Notes |
---|
Architecture and DesignImplementation | | Temporary files and other supporting resources should be
deleted/released immediately after they are no longer needed. | | |
RelationshipsCWE-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.
Related CWE | Type | View | Chain |
---|
CWE-459 ChildOf CWE-892 | Category | CWE-888 | |
Demonstrative Examples (Details)
- 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).
Observed Examples
- 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.
For more examples, refer to CVE relations in the bottom box.
White Box Definitions None
Black Box Definitions None
Taxynomy Mappings
Taxynomy | Id | Name | Fit |
---|
PLOVER | | Incomplete Cleanup | |
OWASP Top Ten 2004 | A10 | Insecure Configuration Management | CWE_More_Specific |
CERT Java Secure Coding | FIO04-J | Release resources when they are no longer
needed | |
CERT Java Secure Coding | FIO00-J | Do not operate on files in shared
directories | |
References:None