Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-789 (未经控制的内存分配) — Vulnerability Class 99

99 vulnerabilities classified as CWE-789 (未经控制的内存分配). AI Chinese analysis included.

CWE-789 represents a critical memory management weakness where software allocates resources based on unvalidated, excessively large size values provided by external inputs. This flaw typically arises when developers fail to enforce upper bounds on integer parameters before invoking allocation functions, allowing attackers to supply maliciously crafted values that trigger massive memory consumption. Exploitation often leads to denial-of-service conditions through system exhaustion or resource starvation, potentially destabilizing the entire host environment. To mitigate this risk, developers must implement rigorous input validation strategies that strictly check size parameters against predefined, safe thresholds before any allocation occurs. Additionally, utilizing language-specific bounds checking mechanisms and static analysis tools can help identify potential overflows early in the development lifecycle, ensuring that memory requests remain within acceptable operational limits and preventing arbitrary resource depletion.

MITRE CWE 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 (1)
AvailabilityDoS: 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.
Mitigations (2)
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.
Examples (2)
Consider the following code, which accepts an untrusted size value and allocates a buffer to contain a string of the given size.
unsigned int size = GetUntrustedInt(); /* ignore integer overflow (CWE-190) for this example */ unsigned int totBytes = size * sizeof(char); char *string = (char *)malloc(totBytes); InitializeString(string);
Bad · C
Consider the following code, which accepts an untrusted size value and uses the size as an initial capacity for a HashMap.
unsigned int size = GetUntrustedInt(); HashMap list = new HashMap(size);
Bad · Java
CVE IDTitleCVSSSeverityPublished
CVE-2021-27906 A carefully crafted PDF file can trigger an OutOfMemory-Exception while loading the file — Apache PDFBox 5.5 -2021-03-19
CVE-2021-1283 Cisco Data Center Network Manager Information Disclosure Vulnerability — Cisco Data Center Network Manager 5.5 Medium2021-01-20
CVE-2020-3596 Cisco Expressway Series and TelePresence Video Communication Server Denial of Service Vulnerability — Cisco TelePresence Video Communication Server (VCS) Expressway 5.9 Medium2020-10-08
CVE-2020-5303 Denial of service in Tendermint — Tendermint 3.1 Low2020-04-10
CVE-2020-8552 Kubernetes API server denial of service — Kubernetes 5.3 Medium2020-03-27
CVE-2020-8551 Kubernetes kubelet denial of service — Kubernetes 4.3 Medium2020-03-27
CVE-2018-12541 Eclipse Vert.x 安全漏洞 — Eclipse Vert.x 6.5 -2018-10-10
CVE-2017-7652 Eclipse Mosquitto 安全漏洞 — Eclipse Mosquitto 6.8 -2018-04-25
CVE-2017-7651 Eclipse Mosquitto 安全漏洞 — Eclipse Mosquitto 7.5 -2018-04-24

Vulnerabilities classified as CWE-789 (未经控制的内存分配) represent 99 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.