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

164 results · Clear filters · Feed

  • Medium 4.7

    FFmpeg 9.0 through 9.0.2 Memory Exhaustion via LCEVC Enhancement Dimensions

    FFmpeg 9.0 through 9.0.2 built with liblcevc_dec fails to validate LCEVC enhanced output dimensions against max_pixels in libavcodec/decode.c before frame allocation. Attackers can supply crafted H.264, HEVC or VVC streams declaring huge LCEVC resolutions to …

  • Medium 5.5

    FFmpeg through 9.0.2 Excessive Memory Allocation via SBaGen Demuxer

    FFmpeg through 9.0.2 contains an uncontrolled memory allocation vulnerability in sbg_read_header() in libavformat/sbgdec.c that derives an unbounded default frame size from the script's sample rate. Attackers can supply a crafted SBaGen script declaring a ver…

  • Medium 5.5

    FFmpeg through 9.0.2 Excessive Memory Allocation via Interplay ACM Decoder

    FFmpeg through 9.0.2 contains an uncontrolled memory allocation vulnerability in the Interplay ACM decoder that allows attackers to exhaust memory via an attacker-controlled block size. Attackers can supply a crafted ACM file with maximum level and row count …

  • Medium 5.5

    FFmpeg through 9.0.2 Memory Exhaustion DoS via APE Decoder apedec.c

    FFmpeg through 9.0.2 contains a memory exhaustion vulnerability in ape_decode_frame() in libavcodec/apedec.c that fails to enforce the 73728-sample limit for legacy APE frames. Attackers can supply a crafted legacy Monkey's Audio file declaring an enormous nb…

  • Medium 5.3

    101arrowz fflate index.mjs unzipSync memory allocation

    A weakness has been identified in 101arrowz fflate up to 0.8.3. This issue affects the function unzipSync of the file esm/index.mjs. This manipulation causes uncontrolled memory allocation. It is possible to initiate the attack remotely. The exploit has been …

  • Medium 4.3

    laspy LAS File lasreader.py memory allocation

    A vulnerability has been found in laspy up to 2.7.0. Affected by this issue is some unknown functionality of the file laspy/lasreader.py of the component LAS File Handler. The manipulation leads to uncontrolled memory allocation. Remote exploitation of the at…

  • Medium 5.3

    CESNET ipfixcol2 2.7.1 before 2.9.0 Memory Exhaustion via TCP LZ4 Decoder

    CESNET ipfixcol2 2.7.1 before 2.9.0 contains a memory allocation vulnerability in Lz4Decoder::read_start_header() that allows unauthenticated attackers to exhaust memory by declaring unbounded ring buffer sizes. Attackers can open TCP connections sending LZ4 …

  • Medium 4.3

    isomorphic-git: Unbounded memory allocation from attacker-controlled delta target size (DoS)

    isomorphic-git is a pure JavaScript implementation of Git for Node.js and browsers. Prior to 1.38.6, isomorphic-git reads a server-controlled targetSize while applying a packfile delta in src/utils/applyDelta.js and passes it without a bound to Buffer.alloc(t…

  • Medium 5.5

    LibreDWG: excessive class-decoding reallocation in R13-R2000 DWG parsing

    LibreDWG is a free C library to read and write DWG files. Prior to 0.14, a specially crafted R13-R2000 DWG can trigger algorithmic resource exhaustion in `decode_R13_R2000` in `src/decode.c`. The class-decoding loop performs `realloc` on every iteration witho…

  • Medium 5.9

    MariaDB Connector/J: Rogue server can crash the client during caching_sha2_password authentication

    MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases. From 3.0.0 until 3.3.7 and 3.4.5, during caching_sha2_password authentication, the authentication-more-data response was treated as a length-encoded byte arr…

  • Medium 5.9

    MariaDB Connector/J: Rogue server can drive large heap allocations from server-declared lengths in OK packets

    MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases. From 3.0.0 until 3.3.7, 3.4.5, and 3.5.11, when CLIENT_SESSION_TRACK was negotiated, the OkPacket.parse() and OkPacket.parseWithInfo() paths allocated byte a…

  • Medium 5.3

    nipy nibabel Header volumeutils.py array_from_file memory allocation

    A security vulnerability has been detected in nipy nibabel up to 5.4.2. The affected element is the function array_from_file of the file nibabel/volumeutils.py of the component Header Handler. The manipulation leads to uncontrolled memory allocation. The atta…

  • Medium 5.3

    nschloe meshio VTK Reader _vtk_42.py memory allocation

    A weakness has been identified in nschloe meshio up to 5.3.5. Impacted is an unknown function of the file meshio/_vtk_42.py of the component VTK Reader. Executing a manipulation of the argument DIMENSIONS can lead to uncontrolled memory allocation. The attack…

  • Medium 4.7

    PostgreSQL Anonymizer: Unbounded image-decode memory allocation (DoS) in anon.image_blur()

    PostgreSQL Anonymizer's `anon.image_blur()` function doesn't check the declared dimension of the provided image, allowing an attacker to provide a small image with enormous declared dimensions. This vulnerability can be exploited to exhaust the memory of a ba…

  • Medium 4.7

    PostgreSQL Anonymizer: Unbounded memory allocation (DoS) in range-based dummy functions

    PostgreSQL Anonymizer's range-based dummy functions dont constraint the range size. This vulnerability can be exploited to exhaust the memory of a backend and OOM-kill it (when ovecommit is on), which results in a cluster-wide crash recovery. The problem is r…

  • Medium 6.5

    Apache Kafka: Denial of service via unbounded memory allocation when decoding compressed record batches

    When a broker decodes a compressed record batch, the per-record decoder reads a declared body size from the decompressed stream and allocates a buffer of that size before validating it against the bytes available or any configured limit. The size is attacker-…

  • Medium 6.2

    ONNX: Denial of service via unchecked expansion of packed sub-byte tensors in ONNX Python APIs

    Open Neural Network Exchange (ONNX) is an open standard for machine learning interoperability. Prior to 1.22.0, _unpack_2bit() and _unpack_4bit() resize unpacked arrays according to attacker-controlled TensorProto.dims without verifying that raw_data or int32…

  • Medium 6.5

    Mattermost allows authenticated users to trigger excessive memory allocation via crafted msgpack binary WebSocket frames

    Mattermost versions 11.9.x <= 11.9.1, 11.8.x <= 11.8.5, 11.7.x <= 11.7.10, 11.10.x <= 11.10.1 Mattermost fail to apply allocation limits to the byte-string decode paths in its WebSocket msgpack decoder, which allows an authenticated remote attacker to cause e…

  • Medium 5.3

    smg-project smg llm-multimodal jpeg_turbo.rs decode_jpeg_rgb memory allocation

    A vulnerability was identified in smg-project smg 1.7.0/1.8.0/1.9.0/1.10.0/1.10.1. Affected is the function jpeg_turbo::decode_jpeg_rgb of the file crates/multimodal/src/jpeg_turbo.rs of the component llm-multimodal. The manipulation leads to uncontrolled mem…

  • Medium 5.5

    Ghidra through 12.2 Denial of Service via BinaryField Memory Allocation

    Ghidra through 12.2 contains an uncontrolled memory allocation vulnerability in BinaryField.read() that allows attackers to exhaust heap memory via an unchecked 32-bit length field. Attackers can persuade users to import a crafted GZF packed database file, tr…

  • Medium 5.5

    Ghidra 10.2 through 12.1.4 Denial of Service via ELF Loader Extended Header Counts

    Ghidra 10.2 through 12.1.4 contains a denial of service vulnerability in the ELF loader's ElfHeader class that allocates arrays sized by unvalidated extended section and program header counts. Attackers can supply a crafted 128-byte ELF file that triggers an …

  • Medium 5.5

    libbluray through 1.5.1 Uncontrolled Memory Allocation via _parse_extent_start_points

    VideoLAN libbluray through 1.5.1 contains an uncontrolled memory allocation vulnerability in _parse_extent_start_points() in clpi_parse.c that trusts the num_point field without bounds checking. Attackers can supply a crafted .clpi file on a disc, image, or d…

  • Medium 6.5

    Gstreamer1-plugins-ugly-free: gstreamer1-plugins-ugly-free: unbounded memory allocation in asfdemux simple index parser

    A flaw was found in the GStreamer ASF demuxer in gst-plugins-ugly. When parsing a Simple Index object, an attacker-controlled entry count is used to size a heap allocation without being limited to the payload available in the object. Processing a crafted ASF,…

  • Medium 6.1

    libspatialite through 5.1.0 Uncontrolled Memory Allocation via ParseWkbPolygon Ring Count

    libspatialite through 5.1.0 fails to validate the polygon ring count in ParseWkbPolygon, allowing attackers to trigger uncontrolled interior-ring allocation via crafted geometry BLOBs. Attackers can supply a crafted polygon in a SpatiaLite database or ST_Geom…

  • Medium 5.5

    OW2 ASM 3.0 before 9.11 Excessive Memory Allocation via Multiple RET Instructions

    OW2 ASM 3.0 before 9.11 contains an excessive memory allocation vulnerability in Label.addSubroutineRetSuccessors() that fails to enforce the single-RET-per-JSR rule. Attackers can supply a crafted invalid class file with multiple RET instructions for one JSR…

  • Medium 5.5

    OW2 ASM 5.0 before 9.11 Excessive Memory Allocation via BootstrapMethods Attribute

    OW2 ASM 5.0 before 9.11 contains an excessive memory allocation vulnerability in ClassReader.readBootstrapMethodsAttribute() that sizes an int array from num_bootstrap_methods without validating attribute_length. Attackers can supply a crafted class file of a…

  • Medium 6.5

    Unbounded memory allocation in the Prometheus rule conversion API

    The Prometheus rule conversion API endpoints in Grafana do not limit request body size, allowing authenticated users to trigger unbounded memory allocations that can crash the server through out-of-memory conditions.

  • Medium 6.7

    ConnectBot SSH: Excessive allocation and integer overflow in DER private-key parsing

    ConnectBot SSH Client Library is written in Kotlin with Kaitai Struct and KStateMachine. Prior to 0.3.1, DerReader.readLength() accepts excessive long-form DER length octets, accumulates them into an Int, and primitive readers allocate arrays without checking…

  • Medium 6.9

    ConnectBot SSH: Unbounded SSH field lengths can cause excessive memory allocation

    ConnectBot SSH Client Library is written in Kotlin with Kaitai Struct and KStateMachine. Prior to 0.3.1, the SSH protocol parser trusts attacker-controlled inner byte lengths and element counts without verifying that they fit in the containing packet. A malic…

  • Medium 5.3

    beautifier js-beautify memory allocation

    A weakness has been identified in beautifier js-beautify up to 1.15.1/2.0.3. The affected element is an unknown function. Executing a manipulation can lead to uncontrolled memory allocation. The attack may be launched remotely. The vendor was contacted early …

  • Medium 4.3

    zhayujie CowAgent Media Download memory allocation

    A security vulnerability has been detected in zhayujie CowAgent up to 2.1.9. The impacted element is an unknown function of the component Media Download Handler. Such manipulation leads to uncontrolled memory allocation. It is possible to launch the attack re…

  • Medium 6.9

    Unbounded allocation in decimal Decimal.round/3 driven by the places argument enables DoS

    Memory Allocation with Excessive Size Value vulnerability in ericmj decimal allows Denial of Service. Decimal.round/3 builds the full result for the requested number of decimal places before the context precision (34 digits by default) is applied, so its cost…

  • Medium 6.2

    music-metadata: MP4 parser allows memory exhaustion via oversized extended atom length

    music-metadata is a metadata parser for audio and video media files. Prior to 11.16.0, the MP4 parser accepts an attacker-controlled 64-bit extended atom size, converts it to a JavaScript Number, and uses the resulting payload length for atom-specific readTok…

  • Medium 6.2

    music-metadata: EBML parser trusts element lengths, allowing memory exhaustion or process abort

    music-metadata is a metadata parser for audio and video media files. Prior to 11.16.0, the Matroska and WebM EBML parser decodes an attacker-controlled VINT element length and uses it for string-token or Uint8Array allocation before confirming that the leaf f…

  • Medium 6.2

    music-metadata: ID3v2 tag size not validated before allocation, causing memory exhaustion DoS

    music-metadata is a metadata parser for audio and video media files. Prior to 11.16.0, the ID3v2 parser trusts the syncsafe tag-size field and allocates the complete tag body before checking whether the input contains the declared bytes. A truncated file cont…

  • Medium 6.2

    music-metadata: Uncontrolled memory allocation in APEv2 parser

    music-metadata is a metadata parser for audio and video media files. Prior to 11.16.0, the APEv2 parser reads an attacker-controlled tag-item size and allocates a Uint8Array for a binary item before proving that the declared item fits in the remaining tag or …

  • Medium 5.3

    ImageMagick: Denial of service in ASE decoder because of missing security checks

    ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to 7.1.2-32, missing validation and resource checks in the ASE decoder allow a crafted ASE image to cause a crash or a long-running operation. This issue is f…

  • Medium 5.3

    yawkat LZ4 Java: LZ4DecompressorWithLength allocates the unvalidated size from the 4-byte length header, so a 5-byte input triggers a 1 GiB allocation and OutOfMemoryError

    yawkat LZ4 Java provides LZ4 compression for Java. Prior to 1.11.2, LZ4DecompressorWithLength uses getDecompressedLength to trust the four-byte decompressed-length header before validating the compressed input, allowing a five-byte attacker-supplied input who…

  • Medium 5.3

    yawkat LZ4 Java: LZ4BlockInputStream allocates an unvalidated compressed length from the stream header

    yawkat LZ4 Java provides LZ4 compression for Java. Prior to 1.11.2, net.jpountz.lz4.LZ4BlockInputStream refill() validates that the compressedLen field in a legacy LZ4Block header is nonnegative but allocates a compressed-input buffer of that attacker-control…

  • 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 with connector management privileges could cause the cluster to allocate an uncontrolled amount of…