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

Applicable To

Languages
Not Language-Specific
Platforms

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 and Automated Dynamic Analysis. 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