CWEweakness
CWE-1325 Improperly Controlled Sequential Memory Allocation
- Alternate terms
- Stack Exhaustion
- Abstraction
- Base
- Structure
- Simple
- Status
- Incomplete
- Languages
- C, C++, Not Language-Specific
- CWE version
- 5.0
Description
The product manages a group of objects or resources and performs a separate memory allocation for each object, but it does not properly limit the total amount of memory that is consumed by all of the combined objects.
Extended description
While the product might limit the amount of memory that is allocated in a single operation for a single object (such as a malloc of an array), if an attacker can cause multiple objects to be allocated in separate operations, then this might cause higher total memory consumption than the developer intended, leading to a denial of service.
Common consequences
• Availability: DoS: Resource Consumption (Memory) — Not controlling memory allocation can result in a request for too much system memory, possibly leading to a crash of the application due to out-of-memory conditions, or the consumption of a large amount of memory on the system.
Potential mitigations
• [Implementation] Ensure multiple allocations of the same kind of object are properly tracked - possibly across multiple sessions, requests, or messages. 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.
• [Operation] Run the 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.
Observed examples
• CVE-2020-36049: JavaScript-based packet decoder uses concatenation of many small strings, causing out-of-memory (OOM) condition
• CVE-2019-20176: Product allocates a new buffer on the stack for each file in a directory, allowing stack exhaustion
• CVE-2013-1591: Chain: an integer overflow (CWE-190) in the image size calculation causes an infinite loop (CWE-835) which sequentially allocates buffers without limits (CWE-1325) until the stack is full.
Related
Attack pattern · CAPEC (1)
- CAPEC-130 Excessive Allocation attack pattern
Observed example · CVE (3)
- CVE-2020-36049 socket.io-parser before 3.4.1 allows attackers to cause a denial of service (memory consumption) via a large packet because a concatenation… vulnerability
- CVE-2019-20176 In Pure-FTPd 1.0.49, a stack exhaustion issue was discovered in the listdir function in ls.c. vulnerability
- CVE-2013-1591 Stack-based buffer overflow in libpixman, as used in Pale Moon before 15.4 and possibly other products, has unspecified impact and… vulnerability
Can precede · CWE (1)
- CWE-476 NULL Pointer Dereference weakness
Child of · CWE (1)
- CWE-770 Allocation of Resources Without Limits or Throttling weakness
Peer of · CWE (1)
- CWE-789 Memory Allocation with Excessive Size Value weakness
Referenced by CAPEC · weakness (1)
- CAPEC-130 Excessive Allocation attack pattern
Referenced by CVE · weakness (26)
- CVE-2026-109618 PHP uses longjmp() for out-of-memory (OOM) errors to exit the current context and abort handling of the request. vulnerability
- CVE-2026-109619 PHP has various global state that temporarily points into request memory. vulnerability
- CVE-2026-92707 MessagePack for C# is a MessagePack serializer for C#. vulnerability
- CVE-2026-96421 USB HID protocol dissector infinite loop and memory leak in 4.6.0 to 4.6.8 and 4.4.0 to 4.4.18 allows denial of service vulnerability
- CVE-2026-71436 Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. vulnerability
- CVE-2026-18772 Improperly controlled sequential memory allocation vulnerability in Samsung Open Source rlottie allows Exponential Data Expansion. vulnerability
- CVE-2026-54080 veraPDF PDF parser is a PDF parser for veraPDF. vulnerability
- CVE-2026-54081 veraPDF PDF parser is a PDF parser for veraPDF. vulnerability
- CVE-2026-13056 Using expressions that generate large arrays it is possible to craft a query that creates very large intermediate objects in memory,… vulnerability
- CVE-2026-34183 Issue summary: Remote peer may exhaust heap memory of the QUIC server or client by flooding it with packets containing PATH_CHALLENGE… vulnerability
- CVE-2026-8199 An authenticated user can cause excess memory usage via bitwise match expression AST processing of $bitsAllSet, $bitsAnySet, $bitsAllClear,… vulnerability
- CVE-2026-6533 Dissection engine LZ77 decompression crash in Wireshark 4.6.0 to 4.6.4 and 4.4.0 to 4.4.14 allows denial of service vulnerability
- CVE-2026-6535 Dissection engine zlib decompression crash in Wireshark 4.6.0 to 4.6.4 and 4.4.0 to 4.4.14 allows denial of service vulnerability
- CVE-2026-6867 SMB2 protocol dissector crash in Wireshark 4.6.0 to 4.6.4 and 4.4.0 to 4.4.14 allows denial of service vulnerability
- CVE-2026-6869 WebSocket protocol dissector crash in Wireshark 4.6.0 to 4.6.4 and 4.4.0 to 4.4.14 allows denial of service vulnerability
- CVE-2026-3201 USB HID protocol dissector memory exhaustion in Wireshark 4.6.0 to 4.6.3 and 4.4.0 to 4.4.13 allows denial of service vulnerability
- CVE-2026-24819 Improperly Controlled Sequential Memory Allocation vulnerability in foxinmy weixin4j (weixin4j-base/src/main/java/com/foxinmy/weixin4j/util… vulnerability
- CVE-2025-13945 HTTP3 dissector crash in Wireshark 4.6.0 and 4.6.1 allows denial of service vulnerability
- CVE-2025-2240 A flaw was found in Smallrye, where smallrye-fault-tolerance is vulnerable to an out-of-memory (OOM) issue. vulnerability
- CVE-2023-52891 A vulnerability has been identified in SIMATIC Energy Manager Basic (All versions < V7.5), SIMATIC Energy Manager PRO (All versions <… vulnerability
- CVE-2024-27796 The issue was addressed with improved checks. vulnerability
- CVE-2024-27804 The issue was addressed with improved memory handling. vulnerability
- CVE-2024-2511 Issue summary: Some non-default TLS server configurations can cause unbounded memory growth when processing TLSv1.3 sessions Impact… vulnerability
- CVE-2023-3341 The code that processes control channel messages sent to `named` calls certain functions recursively during packet parsing. vulnerability
- CVE-2023-28968 An Improperly Controlled Sequential Memory Allocation vulnerability in the Juniper Networks Deep Packet Inspection-Decoder (JDPI-Decoder)… vulnerability
- CVE-2021-43174 NLnet Labs Routinator versions 0.9.0 up to and including 0.10.1, support the gzip transfer encoding when querying RRDP repositories. vulnerability