Skip to content
OpenAdvisories

Weakness (CWE)

CWE-789: Memory Allocation with Excessive Size Value

Variant Draft

The product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated.

How to prevent it (2 mitigations)
  1. Implementation, Architecture and Design

    Perform adequate input validation against any value that influences the amount of memory that is allocated. Define an appropriate strategy for handling requests that exceed the limit, and consider supporting a configuration option so that the administrator can extend the amount of memory to be used if necessary.

  2. Operation

    Run your program using system-provided resource limits for memory. This might still cause the program to crash or exit, but the impact to the rest of the system will be minimized.

Source: MITRE CWE-789

359 results · Feed

  • Low 3.3

    KeePass 2.35 through 2.61.1 Memory Exhaustion via KDBX Header Field Size

    KeePass versions 2.35 through 2.61.1 fail to validate KDBX header field sizes before memory allocation in the ReadHeaderField function. Attackers can craft a malicious KDBX file declaring excessive header field lengths to trigger allocation of gigabytes of me…

  • High 8.7

    A client may send a WebSocket frame with an unknown opcode and a very large declared payload length, causing Jetty to a…

  • Medium 6.8

    In Eclipse Ankaios versions 0.1.0 through 1.0.1, the agent does not limit the length declared by a workload in a length…

  • High 7.5

    MOOS-IvP through 24.8.1 BHV_IPF Demultiplexer Memory Exhaustion via Packet Count

    MOOS-IvP through 24.8.1 contains a denial of service vulnerability in the Demuxer::addMuxPacket() function that trusts the packet count declared in mux headers without validation. Attackers can declare arbitrarily large packet counts to trigger unbounded memo…

  • High 7.5

    MOOS core-moos through 10.4.0 MOOSDB Denial of Service via Unbounded Packet Allocation

    MOOS core-moos through 10.4.0 fails to validate packet length declarations in CMOOSCommPkt::OnBytesWritten(), allowing unauthenticated attackers to trigger unbounded buffer allocation by sending crafted wire packets. Attackers can send packets with large decl…

  • Medium 4.3

    RightNow-AI OpenFang tool_runner.rs shell_exec memory allocation

    A weakness has been identified in RightNow-AI OpenFang up to 0.6.9. This vulnerability affects the function shell_exec of the file crates/openfang-runtime/src/tool_runner.rs. This manipulation causes uncontrolled memory allocation. The attack is possible to b…

  • Medium 5.3

    sigoden aichat API Endpoint serve.rs memory allocation

    A flaw has been found in sigoden aichat up to 0.30.4. This affects an unknown function of the file src/serve.rs of the component API Endpoint. This manipulation causes uncontrolled memory allocation. The attack can be initiated remotely. The exploit has been …

  • Medium 4.3

    NousResearch hermes-agent MCP Tool mcp_tool.py list_tools memory allocation

    A vulnerability was found in NousResearch hermes-agent up to 0.18.2. This vulnerability affects the function list_tools of the file tools/mcp_tool.py of the component MCP Tool. Performing a manipulation results in uncontrolled memory allocation. It is possibl…

  • High 7.5

    openssl_encrypt before 1.4.9 Denial of Service via QR total field

    openssl_encrypt before 1.4.9 fails to validate the total field from QR JSON payloads before materializing ranges. Attackers can supply crafted QR images with extremely large total values to trigger unbounded memory allocation and cause denial of service throu…

  • High 7.5

    openssl_encrypt before 1.4.9 Denial of Service via STREAMINFO

    openssl_encrypt (pip: openssl-encrypt) versions 1.4.8 and earlier fail to validate the 36-bit STREAMINFO total_samples field of FLAC files before using it to size an allocation (np.random.randint(size=(total_samples, channels))). A ~50-byte crafted FLAC file …

  • High 8.7

    kin-openapi: Uncontrolled resource consumption in openapi3filter deepObject query parameter decoding

    kin-openapi is a Go project for handling OpenAPI files. From 0.124.0 until 0.142.0, openapi3filter.sliceMapToSlice in openapi3filter/req_resp_decoder.go converts attacker-controlled sparse indexes from a deepObject query parameter into a dense slice by alloca…

  • Medium 4.9

    Wazuh: Cluster Protocol Memory Exhaustion (DoS) via unbounded receive_str allocation and div_msg_box accumulation

    Wazuh is a free and open source platform used for threat prevention, detection, and response. From 3.9.0 until 4.14.5 and 5.0.0-beta2, the Wazuh cluster protocol in framework/wazuh/core/cluster/common.py allows an authenticated cluster node to exhaust memory …

  • High 7.5

    Memory-amplification denial of service via declared-length preallocation in Amazon ion-java

    Uncontrolled memory allocation in the binary Ion stream cursor in Amazon ion-java before 1.12.0 might allow remote actors to cause a denial of service via a crafted Ion binary document containing a declared-length field that causes excessive heap preallocatio…

  • High 8.7

    RabbitMQ Java client ValueReader: Oversized LongString/bytes length triggers OOM via unchecked allocation

    The RabbitMQ Java client library allows Java and JVM-based applications to connect to and interact with RabbitMQ nodes. Prior to 5.33.1, src/main/java/com/rabbitmq/client/impl/ValueReader.java uses ValueReader.readBytes to accept a wire-declared contentLength…

  • High 7.5

    Excessive memory allocation during VP8L decoding in golang.org/x/image

    VP8L decoding in golang.org/x/image/vp8l can allocate an excessive amount of memory when processing a crafted VP8L image containing many unused Huffman tree groups. This allows a remote attacker to cause a denial of service via memory exhaustion.

  • Medium 6.5

    Memory Allocation with Excessive Size Value in Elasticsearch Highlighting Leading to Denial of Service

    Elasticsearch does not enforce an upper bound on a user-supplied count accepted by a search highlighting option, and the allocation derived from that count is not accounted against any circuit breaker. An authenticated user holding only read privileges on a s…

  • Medium 6.5

    Memory Allocation with Excessive Size Value in Elasticsearch Leading to Denial of Service

    Memory Allocation with Excessive Size Value (CWE-789) in Elasticsearch can lead to denial of service via Excessive Allocation (CAPEC-130). An authenticated user holding only read privileges on a single index can submit one small, specially crafted search requ…

  • Medium 6.5

    Memory Allocation with Excessive Size Value in Elasticsearch Leading to Denial of Service

    Memory Allocation with Excessive Size Value (CWE-789) in the ES|QL query processing of Elasticsearch can lead to denial of service via Excessive Allocation (CAPEC-130). An authenticated user able to submit ES|QL queries could send a specially crafted query wh…

  • Medium 6.5

    Memory Allocation with Excessive Size Value in Elasticsearch Leading to Denial of Service

    Elasticsearch does not validate a size value taken from a user-supplied input before that value is used to reserve memory for an internal data structure. An authenticated user holding only read privileges can submit a single small crafted request to a product…

  • Medium 6.5

    Memory Allocation with Excessive Size Value in Elasticsearch Leading to Denial of Service

    A flaw in Elasticsearch allows a low-privileged authenticated user to submit a single small request containing a forged opaque identifier. Elasticsearch decodes and deserializes the identifier before confirming that it was legitimately issued by the cluster, …

  • High 7.5

    Net::CIDR::Set versions before 0.23 for Perl allow memory exhaustion and malformed set ranges via unbounded IPv6 prefix lengths

    Net::CIDR::Set versions before 0.23 for Perl allow memory exhaustion and malformed set ranges via unbounded IPv6 prefix lengths. The _encode method accepts any prefix length matching `(0|[1-9][0-9]*)` and passes it to _width2bits(), which builds the mask as `…

  • Medium 6.2

    Velociraptor Multiple Crashes in NTFS Parser when applied to invalid NTFS Volumes

    Velociraptor's NTFS parsing library mishandles several out of bound and memory exhaustion bugs which may be triggered by maliciously crafted NTFS images. Typically Velociraptor's NTFS parser is used on live NTFS filesystems, limiting the opportunity of attack…

  • Medium 5.3

    Iperf3: unbounded peer-controlled allocation in iperf3 json_read() allows unauthenticated remote memory exhaustion

    A flaw was found in iperf3. A remote unauthenticated attacker can exploit a vulnerability in the `JSON_read()` function, which accepts a peer-controlled message length and allocates memory without an upper bound. This allows the attacker to trigger excessive …

  • High 7.5

    Wildfly: wildfly-iiop: wildfly-jacorb: wildfly: pre-auth denial of service on the iiop listener

    A flaw was found in Wildfly. A remote unauthenticated attacker can trigger OutOfMemoryError as CSIv2Util's GSS token decoder reads an attacker-controlled length field without bounds checking and attempts to allocate a byte array of that size.

  • Medium 4.6

    Uncontrolled Memory Allocation in GNU cpio

    GNU cpio is vulnerable to an uncontrolled memory allocation in the make_path function at src/makepath.c. The function uses alloca to allocate stack memory based on the length of argpath, which is derived from an archive-controlled pathname during extraction. …

  • High 7.5

    Apache IoTDB: RPC service denial of service via unchecked Thrift string length

    Improper validation of length fields in the Apache IoTDB RPC service may allow a remote unauthenticated attacker to cause a denial of service. By sending a crafted malformed Thrift frame, an attacker can cause IoTDB to allocate an excessive amount of memory a…

  • High 7.5

    Sonic 3 A.I.R. Unbounded Memory Allocation DoS via ReceivedPacketCache

    Sonic 3 A.I.R. before commit 2492d18 contains an unbounded memory allocation vulnerability in ReceivedPacketCache::enqueuePacket() that allows unauthenticated remote attackers to crash the server process by sending a crafted UDP packet with mUniquePacketID se…

  • High 7.5

    Nuxt: Unauthenticated out-of-memory crash via unbounded v-for expansion in island rendering

    Nuxt is an open-source web development framework for Vue.js. From 3.1.0 until 3.21.10 and 4.5.1, an unauthenticated attacker can use a server island v-for prop, including vforToArray and , to trigger unbounded SSR memory allocation until MAX_VFOR_LENGTH = 100…

  • High 7.5

    imagecli - Uncontrolled Memory Allocation via Unbounded scale Ratio Causes Denial of Service

    imagecli's pipeline operation (Scale::apply in src/image_ops.rs) computes output width/height as (dimension as f32 * ratio) as u32 with no upper-bound validation on the CLI-supplied ratio, which is parsed via nom::number::complete::float with no range check. …

  • High 7.5

    Apache Qpid ProtonJ2: Type size/count handling can lead to excessive allocation pre-authentication

    A pre-authentication attacker could leverage type size/count handling to cause excessive allocation leading to potential denial of service. This issue affects Apache Qpid ProtonJ2: through 1.1.0. Users are recommended to upgrade to version 1.2.0, which fixes …

  • High 7.5

    Apache Qpid Proton Dotnet: Type size/count handling can lead to excessive allocation pre-authentication

    pre-authentication attacker could leverage type size/count handling to cause excessive allocation leading to potential denial of service. This issue affects Apache Qpid Proton-Dotnet: through 1.0.0. Users are recommended to upgrade to version 1.1.0, which fix…

  • High 7.5

    Apache Qpid Proton-J: Type size/count handling can lead to excessive allocation pre-authentication

    A pre-authentication attacker could leverage type size/count handling to cause excessive allocation leading to potential denial of service. This issue affects Apache Qpid Proton-J: through 0.34.1. Users are recommended to upgrade to version 0.35.0, which fixe…

  • Medium 6.5

    SnailJob 1.7.0 Denial of Service via FuryUtil.deserialize OOM

    SnailJob 1.7.0 contains a denial of service vulnerability in the FuryUtil.deserialize helper that allows authenticated attackers to crash the server by supplying a crafted Zstandard-compressed payload with an inflated frame_content_size field in the frame hea…

  • High 8.7

    A vulnerability in Veeam Service Provider Console allowing an unauthenticated attacker to exhaust host memory and cause…

  • Medium 5.3

    Potential denial-of-service vulnerability in check_for_language()

    An issue was discovered in Django 5.2 before 5.2.17 and 6.0 before 6.0.8. `django.utils.translation.check_for_language()` is subject to a potential denial-of-service attack when given many distinct, very long language codes, which are retained as keys in an i…

  • High 8.7

    MLS wire decoder allocates attacker-declared opaque length before bounds check

    In Bouncy Castle for Java before 1.85, MLS wire decoder allocates attacker-declared opaque length before bounds check.

  • High 8.7

    Possible OOM from unbounded up-front allocation on a definite-length read

    In Bouncy Castle for Java before 1.85, Possible OOM from unbounded up-front allocation on a definite-length read. This issue also affects Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bc-fips 1.0.2.7 (1.0.X series)…

  • High 8.7

    HSS public-key level count unbounded, enabling huge allocation on verify

    In Bouncy Castle for Java before 1.85, HSS public-key level count unbounded, enabling huge allocation on verify. This issue also affects Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bc-fips 2.0.2 (2.0.X series) an…

  • High 8.7

    DTLS handshake reassembler allocates buffer from unchecked 24-bit length

    In Bouncy Castle for Java before 1.85, DTLS handshake reassembler allocates buffer from unchecked 24-bit length. This issue also affects Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bctls-fips 1.0.24 (1.0.X series…

  • High 8.7

    OpenPGP user-attribute subpacket length bounded only by JVM max memory

    In Bouncy Castle for Java before 1.85, OpenPGP user-attribute subpacket length bounded only by JVM max memory. This issue also affects Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bcpg-fips 1.0.13 (1.0.X series), …