CWE-121: Stack-based Buffer Overflow
3974 CVEs have CWE-121 as their primary weakness. 17 of them are in the CISA KEV catalog. The highest EPSS score among them is 99.981%.
The product writes past the end of a buffer that was allocated on the stack.
Child of CWE-788: Access of Memory Location After End of Buffer
Mitigations
- Operation Build and Compilation: Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking. D3-SFCV (Stack Frame Canary Validation) from D3FEND [REF-1334] discusses canary-based detection in detail.
- Architecture and Design: Use an abstraction library to abstract away risky APIs. Not a complete solution.
- Implementation: Implement and perform bounds checking on input.
- Implementation: Do not use dangerous functions such as gets. Use safer, equivalent functions which check for boundary errors.
- Operation Build and Compilation: Run or compile the software using features or extensions that randomly arrange the positions of a program's executable and libraries in memory. Because this makes the addresses unpredictable, it can prevent an attacker from reliably jumping to exploitable code. Examples include Address Space Layout Randomization (ASLR) [REF-58] [REF-60] and Position-Independent Executables (PIE) [REF-64]. Imported modules may be similarly realigned if their default memory addresses conflict with other modules, in a process known as rebasing (for Windows) and prelinking (for Linux) [REF-1332] using randomly generated addresses. ASLR for libraries cannot be used in conjunction with prelink since it would require relocating the libraries at run-time, defeating the whole purpose of prelinking. For more information on these techniques see D3-SAOR (Segment Address Offset Randomization) from D3FEND [REF-1335].
Observed examples
- CVE-2021-35395: Stack-based buffer overflows in SFK for wifi chipset used for IoT/embedded devices, as exploited in the wild per CISA KEV.
Top released CVEs
KEV first, then the highest EPSS score, the highest CVSS score and the newest.
| CVE | Published | Severity | CVSS | EPSS | Description |
|---|---|---|---|---|---|
| CVE-2025-22457 | 2025-04-03 | CRITICAL | 9.0 | 99.981% | A stack-based buffer overflow in Ivanti Connect Secure before version 22.7R2.6, Ivanti Policy Secure before version 22.7R1.4, and Ivanti ZTA Gateways before… |
| CVE-2025-0282 | 2025-01-08 | CRITICAL | 9.0 | 99.981% | A stack-based buffer overflow in Ivanti Connect Secure before version 22.7R2.5, Ivanti Policy Secure before version 22.7R1.2, and Ivanti Neurons for ZTA… |
| CVE-2021-20038 | 2021-12-08 | CRITICAL | 9.8 | 99.912% | A Stack-based buffer overflow vulnerability in SMA100 Apache httpd server's mod_cgi module environment variables allows a remote unauthenticated attacker to… |
| CVE-2022-20699 | 2022-02-10 | CRITICAL | 10.0 | 72.458% | Multiple vulnerabilities in Cisco Small Business RV160, RV260, RV340, and RV345 Series Routers could allow an attacker to do any of the following: Execute… |
| CVE-2014-9163 | 2014-12-10 | HIGH | 7.8 | 44.880% | Stack-based buffer overflow in Adobe Flash Player before 13.0.0.259 and 14.x and 15.x before 15.0.0.246 on Windows and OS X and before 11.2.202.425 on Linux… |
| CVE-2025-20352 | 2025-09-24 | HIGH | 7.7 | 40.575% | A vulnerability in the Simple Network Management Protocol (SNMP) subsystem of Cisco IOS Software and Cisco IOS XE Software could allow the following: An… |
| CVE-2020-5735 | 2020-04-08 | HIGH | 8.8 | 36.217% | Amcrest cameras and NVR are vulnerable to a stack-based buffer overflow over port 37777. An authenticated remote attacker can abuse this issue to crash the… |
| CVE-2025-32756 | 2025-05-13 | CRITICAL | 9.6 | 30.944% | A stack-based buffer overflow vulnerability [CWE-121] vulnerability in Fortinet FortiCamera 2.1.0 through 2.1.3, FortiCamera 2.0 all versions, FortiCamera 1.1… |
| CVE-2022-20708 | 2022-02-10 | CRITICAL | 10.0 | 14.863% | Multiple vulnerabilities in Cisco Small Business RV160, RV260, RV340, and RV345 Series Routers could allow an attacker to do any of the following: Execute… |
| CVE-2022-20701 | 2022-02-10 | CRITICAL | 10.0 | 9.747% | Multiple vulnerabilities in Cisco Small Business RV160, RV260, RV340, and RV345 Series Routers could allow an attacker to do any of the following: Execute… |
| CVE-2022-20703 | 2022-02-10 | CRITICAL | 10.0 | 9.203% | Multiple vulnerabilities in Cisco Small Business RV160, RV260, RV340, and RV345 Series Routers could allow an attacker to do any of the following: Execute… |
| CVE-2022-20700 | 2022-02-10 | CRITICAL | 10.0 | 5.655% | Multiple vulnerabilities in Cisco Small Business RV160, RV260, RV340, and RV345 Series Routers could allow an attacker to do any of the following: Execute… |
| CVE-2021-27137 | 2026-07-16 | HIGH | 8.1 | 3.995% | An issue was discovered in router/upnp/src/ssdp.c in DD-WRT before 45724. An unsafe strcpy in the UPnP handling functionality allows an unauthenticated remote… |
| CVE-2025-42599 | 2025-04-18 | CRITICAL | 9.8 | 3.355% | Active! mail 6 BuildInfo: 6.60.05008561 and earlier contains a stack-based buffer overflow vulnerability. Receiving a specially crafted request created and… |
| CVE-2026-7273 | 2026-06-16 | HIGH | 8.8 | 2.734% | A stack-based buffer overflow vulnerability in the CGI program of Zyxel GS1900-48HPv2 firmware versions through 2.90(ABTQ.1)C0 could allow a LAN-based… |
| CVE-2025-53521 | 2025-10-15 | CRITICAL | 9.8 | 2.295% | When a BIG-IP APM access policy is configured on a virtual server, specific malicious traffic can lead to Remote Code Execution (RCE). Note: Software versions… |
| CVE-2013-2597 | 2014-08-31 | HIGH | 8.4 | 1.503% | Stack-based buffer overflow in the acdb_ioctl function in audio_acdb.c in the acdb audio driver for the Linux kernel 2.6.x and 3.x, as used in Qualcomm… |
| CVE-2026-21153 | 2026-11-16 | HIGH | 7.4 | 0.139% | Stack-based buffer overflow in libsecuibc.so prior to SMR Nov-2026 Release 1 allows local attackers to execute arbitrary code. |
| CVE-2026-130603 | 2026-11-17 | CRITICAL | 9.3 | not scored | Eclipse Zenoh's zenoh-pico implementation, versions 0.7.2-rc up to but excluding 1.10.2, does not validate the Zenoh identifier (ZID) length when deserializing… |
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cwe_lookup/CWE-121'curl 'https://api.contrastcyber.com/cve_search?cwe_id=CWE-121'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).