CWEweakness
CWE-774 Allocation of File Descriptors or Handles Without Limits or Throttling
Low
Official page ↗
- Alternate terms
- File Descriptor Exhaustion
- Abstraction
- Variant
- Structure
- Simple
- Status
- Incomplete
- Likelihood of exploit
- Low
- Languages
- Not Language-Specific
- CWE version
- 5.0
Description
The product allocates file descriptors or handles on behalf of an actor without imposing any restrictions on how many descriptors can be allocated, in violation of the intended security policy for that actor.
Common consequences
• Availability: DoS: Crash, Exit, or Restart, DoS: Resource Consumption (Other) — This can cause the product to consume all available file descriptors or handles, which can cause the process to crash due to unexpected errors. This could also prevent other processes from performing critical file processing operations.
Potential mitigations
• [Operation, Architecture and Design] Use resource-limiting settings provided by the operating system or environment. For example, when managing system resources in POSIX, setrlimit() can be used to set limits for certain types of resources, and getrlimit() can determine how many resources are available. However, these functions are not available on all operating systems.
When the current levels get close to the maximum that is defined for the application (see CWE-770), then limit the allocation of further resources to privileged users; alternately, begin releasing resources for less-privileged users. While this mitigation may protect the system from attack, it will not necessarily stop attackers from adversely impacting other users.
Ensure that the application performs the appropriate error checks and error handling in case resources become unavailable (CWE-703).
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.)
Related
Child of · CWE (1)
- CWE-770 Allocation of Resources Without Limits or Throttling weakness
Referenced by CVE · weakness (5)
- CVE-2026-22056 StorageGRID (formerly StorageGRID Webscale) versions 11.5 and higher in a non-standard configuration and scenario are susceptible to a… vulnerability
- CVE-2026-27887 Spin is an open source developer tool for building and running serverless applications powered by WebAssembly. vulnerability
- CVE-2026-27204 Wasmtime is a runtime for WebAssembly. vulnerability
- CVE-2024-48848 Large content vulnerabilities are present in ASPECT exposing a device to disk overutilization on a system if administrator credentials… vulnerability
- CVE-2018-1000538 Minio Inc. vulnerability