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-72602026-07-30CVE-2026-672482026-07-30CVE-2026-133096.82026-07-29CVE-2026-50567.82026-07-29CVE-2026-129352026-07-29CVE-2026-671928.12026-07-29CVE-2026-581817.52026-07-29CVE-2026-581807.52026-07-29CVE-2026-581798.12026-07-29CVE-2026-581585.92026-07-29CVE-2026-339305.92026-07-29CVE-2026-437717.12026-07-27CVE-2026-512447.52026-07-27CVE-2026-124952026-07-27CVE-2026-557282026-07-24CVE-2026-168708.82026-07-24CVE-2026-500397.52026-07-23CVE-2026-648318.82026-07-22CVE-2026-613917.22026-07-22CVE-2026-164188.82026-07-21