CWE-770: Allocation of Resources Without Limits or Throttling

Base Incomplete Simple

CWE版本: 4.18

更新日期: 2025-09-09

弱点描述

The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.

常见后果

影响范围: Availability

技术影响: DoS: Resource Consumption (CPU) DoS: Resource Consumption (Memory) DoS: Resource Consumption (Other)

说明: When allocating resources without limits, an attacker could prevent other systems, applications, or processes from accessing the same type of resource. It can be easy for an attacker to consume many resources by rapidly making many requests or causing larger resources to be used than is needed.

潜在缓解措施

阶段: Requirements

描述: Clearly specify the minimum and maximum expectations for capabilities, and dictate which behaviors are acceptable when resource allocation reaches limits.

阶段: Architecture and Design

描述: Limit the amount of resources that are accessible to unprivileged users. Set per-user limits for resources. Allow the system administrator to define these limits. Be careful to avoid CWE-410.

阶段: Architecture and Design

描述: 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, and it will help the administrator to identify who is committing the abuse. 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.

阶段: Implementation

策略: Input Validation

阶段: Architecture and Design

描述: For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

阶段: Architecture and Design

阶段: Architecture and Design

描述: Ensure that protocols have specific limits of scale placed on them.

阶段: Architecture and Design Implementation

阶段: Operation Architecture and Design

策略: Resource Limitation

检测方法

方法: Manual Static Analysis

Manual static analysis can be useful for finding this weakness, but it might not achieve desired code coverage within limited time constraints. If denial-of-service is not considered a significant risk, or if there is strong emphasis on consequences such as code execution, then manual analysis may not focus on this weakness at all.

方法: Fuzzing

有效性: Opportunistic

方法: Automated Dynamic Analysis

Certain automated dynamic analysis techniques may be effective in producing side effects of uncontrolled resource allocation problems, especially with resources such as processes, memory, and connections. The technique may involve generating a large number of requests to the product within a short time frame. Manual analysis is likely required to interpret the results.

方法: Automated Static Analysis

观察示例

参考: CVE-2019-19911

Chain: Python library does not limit the resources used to process images that specify a very large number of bands (CWE-1284), leading to excessive memory consumption (CWE-789) or an integer overflow (CWE-190).

参考: CVE-2009-4017

Language interpreter does not restrict the number of temporary files being created when handling a MIME request with a large number of parts..

参考: CVE-2009-2726

Driver does not use a maximum width when invoking sscanf style functions, causing stack consumption.

参考: CVE-2009-2540

Large integer value for a length property in an object causes a large amount of memory allocation.

参考: CVE-2009-2054

Product allows exhaustion of file descriptors when processing a large number of TCP packets.

参考: CVE-2008-5180

Communication product allows memory consumption with a large number of SIP requests, which cause many sessions to be created.

参考: CVE-2008-1700

Product allows attackers to cause a denial of service via a large number of directives, each of which opens a separate window.

参考: CVE-2005-4650

CMS does not restrict the number of searches that can occur simultaneously, leading to resource exhaustion.

参考: CVE-2020-15100

web application scanner attempts to read an excessively large file created by a user, causing process termination

参考: CVE-2020-7218

Go-based workload orchestrator does not limit resource usage with unauthenticated connections, allowing a DoS by flooding the service

引入模式

阶段 说明
Architecture and Design OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase.
Implementation -
Operation -
System Configuration -

适用平台

编程语言
Not Language-Specific (Often)

分类映射

分类名称 条目ID 条目名称 映射适配度
The CERT Oracle Secure Coding Standard for Java (2011) FIO04-J Close resources when they are no longer needed -
The CERT Oracle Secure Coding Standard for Java (2011) SER12-J Avoid memory and resource leaks during serialization -
The CERT Oracle Secure Coding Standard for Java (2011) MSC05-J Do not exhaust heap space -
ISA/IEC 62443 Part 4-2 Req CR 7.2 -
ISA/IEC 62443 Part 4-2 Req CR 2.7 -
ISA/IEC 62443 Part 4-1 Req SI-1 -
ISA/IEC 62443 Part 4-1 Req SI-2 -
ISA/IEC 62443 Part 3-3 Req SR 7.2 -
ISA/IEC 62443 Part 3-3 Req SR 2.7 -
关键信息

CWE ID: CWE-770

抽象级别: Base

结构: Simple

状态: Incomplete

利用可能性: High

相关弱点
相关攻击模式
CAPEC-125 CAPEC-130 CAPEC-147 CAPEC-197 CAPEC-229 CAPEC-230 CAPEC-231 CAPEC-469 CAPEC-482 CAPEC-486 CAPEC-487 CAPEC-488 CAPEC-489 CAPEC-490 CAPEC-491 CAPEC-493 CAPEC-494 CAPEC-495 CAPEC-496 CAPEC-528