CWE-400: Uncontrolled Resource Consumption

ClassDraftExploit Likelihood: High

The product does not properly control the allocation and maintenance of a limited resource.

View on MITRE
Back to CWE Lookup

Technical Details

Structure
Simple
Vulnerability Mapping
DISCOURAGED

Applicable To

Languages
Not Language-Specific
Platforms

Source-backed guidance

Additional facts reviewed against primary or authoritative security sources.

Combine analysis methods around the CWE-400 resource boundary

MITRE identifies automated static analysis, manual source review, dynamic analysis, fuzzing as applicable detection approaches. Use them to trace attacker-controlled operations to CPU, memory, storage, threads, descriptors, decompression, recursion, queues, and downstream calls, and identify every path without a defensible per-client and global bound. Require a reproducible trace from attacker influence to the unsafe behavior, record coverage gaps, and confirm suspected findings dynamically where safe; no single technique establishes complete coverage.

CWE-400: detection methods and operational guidanceMITRE CWE

Bound resource use at every externally reachable operation

Set authenticated per-principal and global limits for request size, concurrency, work factor, decompression, recursion, fan-out, queues, storage, and execution time. Reject excess work early, apply backpressure, isolate expensive workloads, and preserve capacity for recovery and administrative traffic. Rate limits alone are insufficient when one accepted request can trigger unbounded internal work.

Denial of Service Cheat SheetOWASP Foundation

Apply lessons from CVE-2023-44487 in HTTP/2 implementations

NVD maps CVE-2023-44487 to CWE-400; rapid stream resets could amplify attacker work and enable large distributed denial-of-service attacks. Use the case to bound work per connection and stream, detect asymmetric request patterns, cap concurrent state, and load-test protocol cancellation paths rather than only ordinary completed requests.

CVE-2023-44487 DetailNIST National Vulnerability Database

Model resource-exhaustion paths with CAPEC-125

Use CAPEC-125 to identify where repeated or amplified requests can exhaust a finite resource. Document the resource, attacker cost, amplification factor, admission control, hard ceiling, degradation behavior, and recovery path. Test distributed sources and valid-looking traffic so controls do not depend solely on blocking a single address or malformed request.

CAPEC-125: FloodingMITRE CAPEC

Measure bounded behavior with staged load and stress tests

Model realistic and adversarial workloads, then increase concurrency, request size, compression ratio, nesting, fan-out, and cancellation while measuring latency, memory, CPU, queues, descriptors, and recovery time. Verify limits activate before exhaustion, are partitioned by tenant or identity, and allow the service to recover without restart after load stops.

Load testing websitesGrafana k6

Frequently Asked Questions

What is CWE-400: Uncontrolled Resource Consumption?+

CWE-400: Uncontrolled Resource Consumption is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product does not properly control the allocation and maintenance of a limited resource.

What are the security consequences of Uncontrolled Resource Consumption?+

If exploited, CWE-400 (Uncontrolled Resource Consumption) it can compromise Availability, Access Control and Other, leading to outcomes such as DoS: Crash, Exit, or Restart, DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory), DoS: Resource Consumption (Other), Bypass Protection Mechanism and Other.

How do you prevent or mitigate Uncontrolled Resource Consumption?+

Recommended mitigations for CWE-400 include: Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold. Mitigation of resource exhaustion attacks requires that the target system either: recognizes the attack and denies that user further access for a given amount of time, or uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed. The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question. The second solution is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker. Ensure that protocols have specific limits of scale placed on them.

How is Uncontrolled Resource Consumption detected?+

CWE-400 can be detected using Automated Static Analysis, Automated Dynamic Analysis and Fuzzing. Combining automated tooling with manual review typically yields the best coverage.

Which programming languages are affected by Uncontrolled Resource Consumption?+

CWE-400 commonly affects Not Language-Specific. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What are real-world examples of Uncontrolled Resource Consumption?+

MITRE documents real CVEs mapped to CWE-400, including CVE-2019-19911, CVE-2020-7218, CVE-2020-3566, CVE-2009-2874 and CVE-2009-1928. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-400 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More

Advertisement