Skip to content
OpenAdvisories

Weakness (CWE)

CWE-770: Allocation of Resources Without Limits or Throttling

Base Incomplete

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.

How to prevent it (8 mitigations)
  1. Requirements

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

  2. 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.

  3. 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.

  4. Implementation

    Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.

    When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."

    Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

  5. 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.

  6. Architecture and Design

    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, typically by using increasing time delays

    - 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 can be difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply requires more resources on the part of the attacker.

  7. Architecture and Design

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

  8. Architecture and Design, Implementation

    If the program must fail, ensure that it fails gracefully (fails closed). There may be a temptation to simply let the program fail poorly in cases such as low memory conditions, but an attacker may be able to assert control before the software has fully exited. Alternately, an uncontrolled failure could cause cascading problems with other downstream components; for example, the program could send a signal to a downstream process so the process immediately knows that a problem has occurred and has a better chance of recovery.

    Ensure that all failures in resource allocation place the system into a safe posture.

Source: MITRE CWE-770

2,489 results · Feed

  • High 7.5

    Out-of-Memory Error in Bouncy Castle Crypto

    The ASN.1 parser in Bouncy Castle Crypto (aka BC Java) 1.63 can trigger a large attempted memory allocation, and resultant OutOfMemoryError error, via crafted ASN.1 data. This is fixed in 1.64.

  • High 7.5

    DOS attack in Pillow when processing specially crafted image files

    An issue was discovered in Pillow before 6.2.0. When reading specially crafted invalid image files, the library can either allocate very large amounts of memory or take an extremely long period of time to process the image.

  • Medium 5.3

    sf-pcapng.c in libpcap before 1.9.1 does not properly validate the PHB header length before allocating memory.

  • Critical 9.1

    OpenStack os-vif Ageing time of 0 disables linuxbridge MAC learning

    In OpenStack os-vif 1.15.x before 1.15.2, and 1.16.0, a hard-coded MAC aging time of 0 disables MAC learning in linuxbridge, forcing obligatory Ethernet flooding of non-local destinations, which both impedes network performance and allows users to possibly vi…

  • High 7.5

    Uncontrolled memory consumption in protobuf

    An issue was discovered in the protobuf crate before 2.6.0 for Rust. Attackers can exhaust all memory via Vec::reserve calls.

  • High 7.5
    CVE-2019-9512 EPSS 83%

    Some HTTP/2 implementations are vulnerable to ping floods, potentially leading to a denial of service

    Some HTTP/2 implementations are vulnerable to ping floods, potentially leading to a denial of service. The attacker sends continual pings to an HTTP/2 peer, causing the peer to build an internal queue of responses. Depending on how efficiently this data is qu…

  • High 8.8

    Allocation of Resources Without Limits or Throttling in Apache Tika

    A carefully crafted or corrupt zip file can cause an OOM in Apache Tika's RecursiveParserWrapper in versions 1.7-1.21. Users should upgrade to 1.22 or later.

  • High 7.8

    Allocation of Resources Without Limits or Throttling in Apache Tika

    A carefully crafted package/compressed file that, when unzipped/uncompressed yields the same file (a quine), causes a StackOverflowError in Apache Tika's RecursiveParserWrapper in versions 1.7-1.21. Apache Tika users should upgrade to 1.22 or later.

  • Medium 6.5

    Allocation of Resources Without Limits or Throttling in Apache Tika

    In Apache Tika 1.19 to 1.21, a carefully crafted 2003ml or 2006ml file could consume all available SAXParsers in the pool and lead to very long hangs. Apache Tika users should upgrade to 1.22 or later.

  • High 7.5

    It was found that the fix for CVE-2018-14648 in 389-ds-base, versions 1.4.0.x before 1.4.0.17, was incorrectly applied …

  • Low 3.5

    A Vulnerability has been found in PowerDNS Authoritative Server before versions 4.1.9, 4.0.8 allowing a remote, authori…

  • Medium 5.3
    CVE-2019-11478 Public exploit EPSS 94%

    SACK can cause extensive memory use via fragmented resend queue

    Jonathan Looney discovered that the TCP retransmission queue implementation in tcp_fragment in the Linux kernel could be fragmented when handling certain TCP Selective Acknowledgment (SACK) sequences. A remote attacker could use this to cause a denial of serv…

  • Medium 4.7

    A flaw was found in the Linux kernel's vfio interface implementation that permits violation of the user's locked memory…

  • Medium 6.5
    CVE-2019-1002100 EPSS 17%

    Kubernetes DoS Vulnerability

    In all Kubernetes versions prior to v1.11.8, v1.12.6, and v1.13.4, users that are authorized to make patch requests to the Kubernetes API Server can send a specially crafted patch of type "json-patch" (e.g. `kubectl patch --type json` or `"Content-Type: appli…

  • High 7.5

    Denial of Service Vulnerability in Action View

    There is a possible denial of service vulnerability in Action View (Rails) <5.2.2.1, <5.1.6.2, <5.0.7.2, <4.2.11.1 where specially crafted accept headers can cause action view to consume 100% cpu and make the server unresponsive.

  • High 7.5

    Uncontrolled Memory Consumption in Django

    Django 1.11.x before 1.11.19, 2.0.x before 2.0.11, and 2.1.x before 2.1.6 allows Uncontrolled Memory Consumption via a malicious attacker-supplied value to the django.utils.numberformat.format() function.

  • Medium 6.5

    It was found in Ceph versions before 13.2.4 that authenticated ceph RGW users can cause a denial of service against OMA…

  • High 7.5

    An allocation of memory without limits, that could result in the stack clashing with another memory region, was discove…

  • High 7.4

    An allocation of memory without limits, that could result in the stack clashing with another memory region, was discove…

  • Medium 6.5

    It was found that vdsm before version 4.20.37 invokes qemu-img on untrusted inputs without limiting resources. By uploa…

  • High 7.5

    A vulnerability was discovered in SPICE before 0.13.90 in the server's protocol handling. An attacker able to connect t…

  • Low 3.3

    A memory allocation vulnerability was found in netpbm before 10.61. A maliciously crafted SVG file could cause the appl…

  • High 7.5

    Denial of Service vulnerability with large JSON payloads in fastify

    Fastify node module before 0.38.0 is vulnerable to a denial-of-service attack by sending a request with "Content-Type: application/json" and a very large payload.

  • High 7.5

    Regular Expression Denial of Service in sshpk

    sshpk is vulnerable to ReDoS when parsing crafted invalid public keys.

  • Medium 5.5

    Denial of Service in protobufjs

    protobufjs is vulnerable to ReDoS when parsing crafted invalid .proto files.

  • Medium 5.4

    Cross-Site Request Forgery in Jenkins

    jenkins before versions 2.44, 2.32.2 is vulnerable to a user creation CSRF using GET by admins. While this user record was only retained until restart in most cases, administrators' web browsers could be manipulated to create a large number of user records (S…

  • Medium 5.9

    Denial of Service in Google Guava

    Unbounded memory allocation in Google Guava 11.0 through 24.x before 24.1.1 allows remote attackers to conduct denial of service attacks against servers that depend on this library and deserialize attacker-provided data, because the AtomicDoubleArray class (w…

  • High 7.5

    Spring Data Commons contain a property path parser vulnerability caused by unlimited resource allocation

    Spring Data Commons, versions 1.13 to 1.13.10, 2.0 to 2.0.5, and older unsupported versions, contain a property path parser vulnerability caused by unlimited resource allocation. An unauthenticated remote malicious user (or attacker) can issue requests agains…

  • Medium 6.5

    Uncontrolled resource consumption in nokogiri

    The xz_head function in xzlib.c in libxml2 before 2.9.6 allows remote attackers to cause a denial of service (memory consumption) via a crafted LZMA file, because the decoder functionality does not restrict memory usage to what is required for a legitimate fi…

  • Unscored —

    VNC server implementation in Quick Emulator (QEMU) 2.11.0 and older was found to be vulnerable to an unbounded memory a…

  • Medium 6.5

    tar-split memory exhaustion

    Lack of content verification in Docker-CE (Also known as Moby) versions 1.12.6-0, 1.10.3, 17.03.0, 17.03.1, 17.03.2, 17.06.0, 17.06.1, 17.06.2, 17.09.0, and earlier allows a remote attacker to cause a Denial of Service via a crafted image layer payload, aka g…

  • High 7.5

    ONOS vulnerable to denial of service due to unrestricted NettyMessagingManager payload

    ONOS versions 1.8.0, 1.9.0, and 1.10.0 do not restrict the amount of memory allocated. The Netty payload size is not limited.

  • High 7.5

    Docker Registry has Allocation of Resources Without Limits or Throttling

    Docker Registry before 2.6.2 in Docker Distribution does not properly restrict the amount of content accepted from a user, which allows remote attackers to cause a denial of service (memory consumption) via the manifest endpoint.

  • High 7.5

    priority vulnerable to denial of service

    A HTTP/2 implementation built using any version of the Python priority library prior to version 1.2.0 could be targeted by a malicious peer by having that peer assign priority information for every possible HTTP/2 stream ID. The priority tree would happily co…

  • High 7.5

    Django denial of service via empty session record creation

    contrib.sessions.middleware.SessionMiddleware in Django 1.8.x before 1.8.4, 1.7.x before 1.7.10, 1.4.x before 1.4.22, and possibly other versions allows remote attackers to cause a denial of service (session store consumption or session record removal) via a …

  • High 7.5

    Django Denial-of-service by filling session store

    The session backends in Django before 1.4.21, 1.5.x through 1.6.x, 1.7.x before 1.7.9, and 1.8.x before 1.8.3 allows remote attackers to cause a denial of service (session store consumption) via multiple requests with unique session keys.

  • High 7.5

    Django Denial-of-service possibility with strip_tags

    The utils.html.strip_tags function in Django 1.6.x before 1.6.11, 1.7.x before 1.7.7, and 1.8.x before 1.8c1, when using certain versions of Python, allows remote attackers to cause a denial of service (infinite loop) by increasing the length of the input str…

  • High 7.5

    OpenStack Glance Denial of service by creating a large number of images

    OpenStack Image Registry and Delivery Service (Glance) 2014.2 through 2014.2.2 does not properly remove images, which allows remote authenticated users to cause a denial of service (disk consumption) by creating a large number of images using the task v2 API …

  • Medium 6.5

    OpenStack Glance Denial of service by creating a large number of images

    OpenStack Image Registry and Delivery Service (Glance) 2014.2 through 2014.2.2 does not properly remove images, which allows remote authenticated users to cause a denial of service (disk consumption) by creating a large number of images using the task v2 API …

  • High 7.5

    Django database denial-of-service with ModelMultipleChoiceField

    ModelMultipleChoiceField in Django 1.6.x before 1.6.10 and 1.7.x before 1.7.3, when show_hidden_initial is set to True, allows remote attackers to cause a denial of service by submitting duplicate values, which triggers a large number of SQL queries.