CWE-826: Premature Release of Resource During Expected Lifetime

What is CWE-826?

CWE-826 is Premature Release of Resource During Expected Lifetime. The flaw arises when the product releases a resource that is still intended to be used by itself or another actor. The database currently holds 3 vulnerabilities mapped to CWE-826 and none of them are in the CISA Known Exploited Vulnerabilities catalog.

OWASP Top 10 Rank-
Related CVES (365 days)3
AbstractionBase
Likelihood of exploit-

Vulnerabilities mapped to CWE-826

3 vulnerabilities200% increase year over year

No data

No vulnerability data in CISA KEV for CWE-826

Official definition

ByMitre CWE

The product releases a resource that is still intended to be used by itself or another actor.

Characteristics

Modes of introduction

  • Implementation

Common consequences

ImpactScopeExplanation
Read Application Data, Read MemoryConfidentialityIf the released resource is subsequently reused or reallocated, then a read operation on the original resource might access sensitive data that is associated with a different user or entity.
Unexpected State, DoS: Crash, Exit, or RestartAvailabilityWhen the resource is released, the software might modify some of its structure, or close associated channels (such as a file descriptor). When the software later accesses the resource as if it is valid, the resource might not be in an expected state, leading to resultant errors that may lead to a crash.
Execute Unauthorized Code or Commands, Modify Application Data, Modify MemoryIntegrity, Confidentiality, AvailabilityWhen the resource is released, the software might modify some of its structure. This might affect logic in the sections of code that still assume the resource is active. If the released resource is related to memory and is used in a function call, or points to unexpected data in a write operation, then code execution may be possible upon subsequent accesses.

Detection methods

MethodApproachEffectiveness
Automated Static AnalysisAutomated 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.)-

Representative vulnerabilities

Sources (2)

CWE™ Program, operated by The MITRE Corporation. Copyright © 2006–2026, The MITRE Corporation. The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. CWE Terms of Use.

Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.