CWEweakness

CWE-826 Premature Release of Resource During Expected Lifetime

Official page ↗
Abstraction
Base
Structure
Simple
Status
Incomplete
Languages
Not Language-Specific
CWE version
5.0

Description

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

Common consequences

• Confidentiality: Read Application Data, Read Memory — If 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. • Availability: Unexpected State, DoS: Crash, Exit, or Restart — When 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. • Integrity, Confidentiality, Availability: Execute Unauthorized Code or Commands, Modify Application Data, Modify Memory — When 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

• Automated Static Analysis: Automated 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.)

Observed examples

• CVE-2009-3547: Chain: race condition (CWE-362) might allow resource to be released before operating on it, leading to NULL dereference (CWE-476)

Related

Observed example · CVE (1)

  • CVE-2009-3547 Multiple race conditions in fs/pipe.c in the Linux kernel before 2.6.32-rc6 allow local users to cause a denial of service (NULL pointer… vulnerability

Can precede · CWE (1)

  • CWE-672 Operation on a Resource after Expiration or Release weakness

Child of · CWE (1)

  • CWE-666 Operation on Resource in Wrong Phase of Lifetime weakness

Referenced by CVE · weakness (11)

  • CVE-2026-49427 Pages belonging to largepage shared memory objects were not explicitly wired. vulnerability
  • CVE-2026-53322 In the Linux kernel, the following vulnerability has been resolved: vfio/pci: Clean up DMABUFs before disabling function On device… vulnerability
  • CVE-2026-45984 In the Linux kernel, the following vulnerability has been resolved: gfs2: Fix use-after-free in iomap inline data write path The inline… vulnerability
  • CVE-2026-31663 In the Linux kernel, the following vulnerability has been resolved: xfrm: hold dev ref until after transport_finish NF_HOOK After async… vulnerability
  • CVE-2026-32748 Squid is a caching proxy for the Web. vulnerability
  • CVE-2026-33526 Squid is a caching proxy for the Web. vulnerability
  • CVE-2024-58249 In wxWidgets before 3.2.7, a crash can be triggered in wxWidgets apps when connections are refused in wxWebRequestCURL. vulnerability
  • CVE-2025-31115 XZ Utils provide a general-purpose data-compression library plus command-line tools. vulnerability
  • CVE-2025-24912 hostapd fails to process crafted RADIUS packets properly. vulnerability
  • CVE-2024-51727 Ruijie Reyee OS versions 2.206.x up to but not including 2.320.x contains a feature that could enable attackers to invalidate a legitimate… vulnerability
  • CVE-2023-1297 Consul and Consul Enterprise's cluster peering implementation contained a flaw whereby a peer cluster with service of the same name as a… vulnerability