CWE•Variant•Draft•20 recent CVEs
CWE-789Memory Allocation with Excessive Size Value
Description
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.
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,Architecture and DesignPerform 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.
- OperationRun 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.
Related CWEs
Recent CVEs classified under this CWE
CVE-2026-499752026-06-08CVE-2026-411785.32026-06-04CVE-2026-473196.12026-06-04CVE-2026-95387.52026-05-26CVE-2018-253786.22026-05-25CVE-2018-253687.52026-05-25CVE-2026-84855.92026-05-20CVE-2026-473135.52026-05-19CVE-2026-63404.32026-05-18CVE-2021-479737.52026-05-16CVE-2021-479727.52026-05-16CVE-2021-479717.52026-05-16CVE-2021-479707.52026-05-16CVE-2021-479697.52026-05-16CVE-2026-443757.52026-05-14CVE-2026-425827.52026-05-13CVE-2026-429466.52026-05-13CVE-2026-423485.92026-05-12CVE-2021-479447.52026-05-10CVE-2026-421897.52026-05-08