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-276719.82026-06-09CVE-2026-96692026-06-08CVE-2026-115578.82026-06-08CVE-2026-115538.82026-06-08CVE-2026-367867.52026-06-08CVE-2026-115288.82026-06-08CVE-2026-115248.82026-06-08CVE-2026-115238.82026-06-08CVE-2026-115228.82026-06-08CVE-2026-367897.52026-06-08CVE-2026-115048.82026-06-08CVE-2026-115038.82026-06-08CVE-2026-114999.82026-06-08CVE-2026-114988.82026-06-08CVE-2026-114138.82026-06-06CVE-2026-62402026-06-06CVE-2026-62392026-06-06CVE-2026-367857.52026-06-05CVE-2026-502597.82026-06-05CVE-2026-502587.82026-06-05