Heap-based Buffer Overflow (CWE-122)
CWE-122 is a Variant of buffer overflow where the overwritten buffer lives in the heap. Writing past its bounds corrupts adjacent heap data. Heap overflow and heap buffer overflow are listed alternate terms.
Updated
About CWE-122
Buffer overflows generally crash the program. Heap overflows can also overwrite function pointers in memory and lead to arbitrary code execution outside the program's security policy.
- MITRE name
- Heap-based Buffer Overflow
- Abstraction
- Variant: linked to a certain type of product, typically a specific language or technology
- Status
- Draft
Also Known As
- Heap Overflow
- Heap Buffer Overflow
Mitigations
- Use a language or compiler that performs automatic bounds checking.
- Implement bounds checking on input and avoid unsafe functions in favor of equivalents that enforce buffer limits.
- Enable compiler buffer overflow detection, such as FORTIFY_SOURCE or the Visual Studio /GS flag, as defense in depth.
- Build with ASLR and position-independent executables so memory addresses are harder to predict.
- Use OS-level preventive features for additional defense in depth.
Detection
Fuzzing is rated highly effective. Compiler-integrated runtime checkers such as AddressSanitizer give moderate coverage and report the error condition rather than the original mistake.
CWE-122 in the KEV Catalog
as of 2026-11-23- 24 CISA KEV entries name Heap-based Buffer Overflow (CWE-122) in their CVE record, tied for 20th among the 196 weaknesses named in the catalog.
- CISA added 3 CWE-122 entries to the KEV catalog in 2024, 4 in 2025, and 5 so far in 2026.
- Microsoft has the most CWE-122 entries in the CISA KEV catalog (11), followed by Adobe (3) and Fortinet (2).
- For CWE-122 entries added to the CISA KEV catalog since 2023, the median time from CVE publication to KEV listing is 0 days (listed on the publication date), compared with 15 days for all entries added in that period.
- CISA marks 17% of CWE-122 KEV entries (4 of 24) as known to be used in ransomware campaigns, compared with 20% of all KEV entries.
- CISA's SSVC enrichment rates 25% of CWE-122 KEV entries with SSVC data (6 of 24) as automatable, compared with 41% across the catalog.
Related Attack Patterns
1 CAPEC patternsCAPEC-92Forced Integer OverflowDetailed · Severity High · Likelihood High
Loading…
CWE-122 Vulnerabilities
33 CVEs| CVE | Title | Vendor | CVSS | EPSS | KEV | Published |
|---|---|---|---|---|---|---|
| CVE-2026-94127KEV BIG-IP APM OAuth vulnerability | BIG-IP APM OAuth vulnerability | F5 | 9.3 | 26.6% | KEV | 2026-09-22 |
| CVE-2025-25249KEV Fortinet Multiple Products Heap-based Buffer Overflow Vulnerability | Fortinet Multiple Products Heap-based Buffer Overflow Vulnerability | Fortinet | 7.4 | 3.7% | KEV | 2026-01-13 |
| CVE-2026-85880KEV Windows Advanced Local Procedure Call (ALPC) Elevation of Privilege Vulnerability | Windows Advanced Local Procedure Call (ALPC) Elevation of Privilege Vulnerability | Microsoft | 7.8 | 0.4% | KEV | 2026-09-08 |
| CVE-2026-53362KEV ipv6: account for fraggap on the paged allocation path | ipv6: account for fraggap on the paged allocation path | Linux | 7.8 | 1.3% | KEV | 2026-07-04 |
| CVE-2009-3459KEV Adobe Acrobat and Reader Heap-Based Buffer Overflow Vulnerability | Adobe Acrobat and Reader Heap-Based Buffer Overflow Vulnerability | - | 8.8 | 86.5% | KEV | 2009-10-13 |
| CVE-2025-24985KEV Windows Fast FAT File System Driver Remote Code Execution Vulnerability | Windows Fast FAT File System Driver Remote Code Execution Vulnerability | Microsoft | 7.8 | 3.9% | KEV | 2025-03-11 |
| CVE-2025-24993KEV Windows NTFS Remote Code Execution Vulnerability | Windows NTFS Remote Code Execution Vulnerability | Microsoft | 7.8 | 2.2% | KEV | 2025-03-11 |
| CVE-2025-21418KEV Windows Ancillary Function Driver for WinSock Elevation of Privilege Vulnerability | Windows Ancillary Function Driver for WinSock Elevation of Privilege Vulnerability | Microsoft | 7.8 | 2.1% | KEV | 2025-02-11 |
| CVE-2025-21333KEV Windows Hyper-V NT Kernel Integration VSP Elevation of Privilege Vulnerability | Windows Hyper-V NT Kernel Integration VSP Elevation of Privilege Vulnerability | Microsoft | 7.8 | 10.1% | KEV | 2025-01-14 |
| CVE-2024-49138KEV Windows Common Log File System Driver Elevation of Privilege Vulnerability | Windows Common Log File System Driver Elevation of Privilege Vulnerability | Microsoft | 7.8 | 26.2% | KEV | 2024-12-10 |
| CVE-2024-38812KEV Heap-overflow vulnerability | Heap-overflow vulnerability | - | 9.8 | 54.6% | KEV | 2024-09-17 |
| CVE-2024-30051KEV Windows DWM Core Library Elevation of Privilege Vulnerability | Windows DWM Core Library Elevation of Privilege Vulnerability | Microsoft | 7.8 | 6.2% | KEV | 2024-05-14 |
| CVE-2023-4911KEV Glibc: buffer overflow in ld.so leading to privilege escalation | Glibc: buffer overflow in ld.so leading to privilege escalation | - | 7.8 | 63.8% | KEV | 2023-10-03 |
| CVE-2023-36036KEV Windows Cloud Files Mini Filter Driver Elevation of Privilege Vulnerability | Windows Cloud Files Mini Filter Driver Elevation of Privilege Vulnerability | Microsoft | 7.8 | 10.2% | KEV | 2023-11-14 |
| CVE-2023-27997KEV Fortinet FortiOS and FortiProxy SSL-VPN Heap-Based Buffer Overflow Vulnerability | Fortinet FortiOS and FortiProxy SSL-VPN Heap-Based Buffer Overflow Vulnerability | Fortinet | 9.2 | 86.8% | KEV | 2023-06-13 |
| CVE-2023-28252KEV Windows Common Log File System Driver Elevation of Privilege Vulnerability | Windows Common Log File System Driver Elevation of Privilege Vulnerability | Microsoft | 7.8 | 48.9% | KEV | 2023-04-11 |
| CVE-2023-23376KEV Windows Common Log File System Driver Elevation of Privilege Vulnerability | Windows Common Log File System Driver Elevation of Privilege Vulnerability | Microsoft | 7.8 | 10.8% | KEV | 2023-02-14 |
| CVE-2019-3568KEV WhatsApp VOIP Stack Buffer Overflow Vulnerability | WhatsApp VOIP Stack Buffer Overflow Vulnerability | 9.8 | 30.1% | KEV | 2019-05-14 | |
| CVE-2015-3113KEV Adobe Flash Player Heap-Based Buffer Overflow Vulnerability | Adobe Flash Player Heap-Based Buffer Overflow Vulnerability | - | 7.8 | 99.8% | KEV | 2015-06-23 |
| CVE-2022-26318KEV WatchGuard Firebox and XTM Appliances Arbitrary Code Execution | WatchGuard Firebox and XTM Appliances Arbitrary Code Execution | - | 9.8 | 78.2% | KEV | 2022-03-04 |
| CVE-2021-35395KEV Realtek AP-Router SDK Buffer Overflow Vulnerability | Realtek AP-Router SDK Buffer Overflow Vulnerability | - | 9.8 | 98.1% | KEV | 2021-08-16 |
| CVE-2021-21017KEV Acrobat Reader DC Heap-based Buffer Overflow Vulnerability Could Lead To Arbitrary Code Execution | Acrobat Reader DC Heap-based Buffer Overflow Vulnerability Could Lead To Arbitrary Code Execution | Adobe | 8.8 | 86.3% | KEV | 2021-02-11 |
| CVE-2021-1647KEV Microsoft Defender Remote Code Execution Vulnerability | Microsoft Defender Remote Code Execution Vulnerability | Microsoft | 7.8 | 39.7% | KEV | 2021-01-12 |
| CVE-2020-16010KEV Google Chrome for Android UI Heap Buffer Overflow Vulnerability | Google Chrome for Android UI Heap Buffer Overflow Vulnerability | 9.6 | 6.4% | KEV | 2020-11-03 | |
| CVE-2026-42945 NGINX ngx_http_rewrite_module vulnerability | NGINX ngx_http_rewrite_module vulnerability | F5 | 9.2 | 69.4% | 2026-05-13 | |
| CVE-2026-114938 | - | Oracle Corporation | 8.1 | 57.3% | 2026-11-17 | |
| CVE-2026-27654 NGINX ngx_http_dav_module vulnerability | NGINX ngx_http_dav_module vulnerability | F5 | 8.8 | 27.6% | 2026-03-24 | |
| CVE-2026-47291 HTTP.sys Remote Code Execution Vulnerability | HTTP.sys Remote Code Execution Vulnerability | Microsoft | 9.8 | 25.3% | 2026-06-09 | |
| CVE-2026-45657 Windows Kernel Remote Code Execution Vulnerability | Windows Kernel Remote Code Execution Vulnerability | Microsoft | 9.8 | 15.5% | 2026-06-09 | |
| CVE-2026-8711 NGINX JavaScript vulnerability | NGINX JavaScript vulnerability | F5 | 9.2 | 9.7% | 2026-05-19 | |
| CVE-2026-9256 NGINX ngx_http_rewrite_module vulnerability | NGINX ngx_http_rewrite_module vulnerability | F5 | 9.2 | 8.3% | 2026-05-22 | |
| CVE-2026-42533 NGINX Map directive and Regex matching vulnerability | NGINX Map directive and Regex matching vulnerability | F5 | 9.2 | 6.5% | 2026-07-15 | |
| CVE-2026-42055 NGINX ngx_http_proxy_v2_module and ngx_http_grpc_module vulnerability | NGINX ngx_http_proxy_v2_module and ngx_http_grpc_module vulnerability | F5 | 9.2 | 5.4% | 2026-06-17 |
Frequently Asked Questions
What is CWE-122?→
CWE-122 is a heap-based buffer overflow, where a write past the end of a buffer allocated on the heap corrupts nearby memory.
Do ASLR and compiler protections eliminate heap overflows?→
No. MITRE rates them as defense in depth. They make exploitation harder but do not remove the underlying bounds error.
How many exploited vulnerabilities are classified as CWE-122?→
This database lists 33 CVE records mapped to CWE-122 by their CVE Numbering Authority. 24 of them are in the CISA Known Exploited Vulnerabilities catalog, and CISA links 4 to known ransomware campaigns. Examples include CVE-2026-94127, CVE-2025-25249, CVE-2026-85880.
How quickly are CWE-122 vulnerabilities added to the KEV catalog?→
For CWE-122 entries added to the CISA KEV catalog since 2023, the median time from CVE publication to KEV listing is 0 days (listed on the publication date), compared with 15 days for all entries added in that period. These figures are as of November 23, 2026.
Sources
Weakness definitions summarized from the CWE List, © The MITRE Corporation, used under the CWE Terms of Use. CWE mappings come from each CVE record's CNA. Exploited-in-the-wild data from the CISA KEV catalog (CC0). This site is not affiliated with or endorsed by MITRE or CISA. Attack patterns from CAPEC 3.9, © The MITRE Corporation, used under the CAPEC Terms of Use.