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-1186108.82026-10-28CVE-2026-1186096.82026-10-28CVE-2026-1186058.02026-10-28CVE-2026-1186046.82026-10-28CVE-2026-1186038.02026-10-28CVE-2026-1034088.82026-10-28CVE-2026-863788.82026-10-28CVE-2026-1037809.82026-10-28CVE-2026-1176097.12026-10-28CVE-2026-483797.82026-10-27CVE-2026-938572026-10-27CVE-2026-904422026-10-27CVE-2026-1138812026-10-27CVE-2026-1035942026-10-27CVE-2026-1035932026-10-27CVE-2026-907254.92026-10-27CVE-2026-907324.92026-10-27CVE-2026-907314.92026-10-27CVE-2026-1115482026-10-27CVE-2026-865759.42026-10-27