This vulnerability occurs when a program allocates memory but fails to properly release it after it's no longer needed, causing a gradual accumulation of unused memory that can't be reclaimed by the system.

Memory leaks happen when developers allocate memory (e.g., using `malloc()`, `new`, or similar functions) but neglect to free or delete it once the relevant operation is complete. This often stems from complex control flows, error conditions, or long-running processes where tracking every allocation becomes difficult. Over time, especially in servers or persistent applications, these unreleased blocks accumulate, steadily draining available system memory. This resource exhaustion can lead to severe performance degradation, application instability, or complete crashes when the system runs out of memory. To prevent this, developers must ensure that every allocation has a corresponding, guaranteed release, using techniques like automatic resource management (e.g., smart pointers in C++, try-with-resources in Java), rigorous code reviews, and specialized leak detection tools during testing.
Impact: DoS: Crash, Exit, or RestartDoS: InstabilityDoS: Resource Consumption (CPU)DoS: Resource Consumption (Memory)
Most memory leaks result in general product reliability problems, but if an attacker can intentionally trigger a memory leak, the attacker might be able to launch a denial of service attack (by crashing or hanging the program) or take advantage of other unexpected program behavior resulting from a low memory condition.
Impact: Reduce Performance
Strategy: Libraries or Frameworks
cMedium