CWE•Variant•Draft•20 recent CVEs
CWE-121Stack-based Buffer Overflow
Description
A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function).
Common consequences
- Availability→Modify Memory,DoS: Crash, Exit, or Restart,DoS: Resource Consumption (CPU),DoS: Resource Consumption (Memory)Buffer overflows generally lead to crashes. Other attacks leading to lack of availability are possible, including putting the program into an infinite loop.
- Integrity,Confidentiality,Availability,Access Control→Modify Memory,Execute Unauthorized Code or Commands,Bypass Protection MechanismBuffer overflows often can be used to execute arbitrary code, which is usually outside the scope of a program's implicit security policy.
- Integrity,Confidentiality,Availability,Access Control,Other→Modify Memory,Execute Unauthorized Code or Commands,Bypass Protection Mechanism,OtherWhen the consequence is arbitrary code execution, this can often be used to subvert any other security service.
Potential mitigations
- Operation,Build and Compilation[object Object]
- Architecture and DesignUse an abstraction library to abstract away risky APIs. Not a complete solution.
- ImplementationImplement and perform bounds checking on input.
- ImplementationDo not use dangerous functions such as gets. Use safer, equivalent functions which check for boundary errors.
- Operation,Build and Compilation[object Object]
Related CWEs
Recent CVEs classified under this CWE
CVE-2026-907797.52026-09-13CVE-2026-905589.82026-09-12CVE-2026-860937.52026-09-10CVE-2026-154192026-09-10CVE-2026-880472026-09-10CVE-2026-882897.52026-09-10CVE-2026-882877.52026-09-10CVE-2026-882844.92026-09-10CVE-2026-882834.92026-09-10CVE-2026-882814.92026-09-10CVE-2026-882804.92026-09-10CVE-2026-882794.92026-09-10CVE-2026-882686.52026-09-10CVE-2026-428058.42026-09-10CVE-2026-428047.62026-09-10CVE-2026-820798.42026-09-10CVE-2026-210936.72026-09-09CVE-2026-853842026-09-08CVE-2026-92163.52026-09-08CVE-2026-839907.82026-09-08