What is CWE-787?
The product writes data past the end, or before the beginning, of the intended buffer.
CWE-787 is a base-level weakness in MITRE’s Common Weakness Enumeration, with a MITRE likelihood of exploit of High. Applicable platforms: Language: Memory-Unsafe; Language: C; Language: C++; Language: Assembly; Technology: ICS/OT.
Source: MITRE CWE (CWE-787 definition, reproduced verbatim). Counts and linkage below are Threadlinqs data.
Consequences
- Integrity — Modify Memory, Execute Unauthorized Code or Commands. Write operations could cause memory corruption. In some cases, an adversary can modify control data such as return addresses in order to execute unexpected code.
- Availability — DoS: Crash, Exit, or Restart. Attempting to access out-of-range, invalid, or unauthorized memory could cause the product to crash.
- Other — Unexpected State. Subsequent write operations can produce undefined or unexpected results.
Source: MITRE CWE, common consequences.
How CWE-787 is exploited in the wild
Threadlinqs maps 177 CVEs to CWE-787, published between 2016-08-25 and 2026-11-03. 35 are listed in CISA’s Known Exploited Vulnerabilities catalog, the authoritative record of exploitation in the wild, and 9 are tied to ransomware campaigns. By CVSS v3 severity the set splits into 37 critical, 102 high, 22 medium, 1 low. The highest EPSS score in the set is 99.9% (CVE-2023-4863), the modelled probability of exploitation in the next 30 days. 224 tracked threats reference CWE-787 directly or through a CVE it covers; the most recent is “Multi-vendor vulnerability roundup: Node2Shell Brotli RCE (CVE-2026-111497, actively exploited, CISA KEV), WatchGuard CVE-2026-98432 (CVSS 9.8) and AuthPoint Gateway flaws, Cisco UCS Central CVE-2026-76506, SonicWall GMS CVE-2026-109593/109594 unpatched (EOL)” (2026-11-06). Affected products concentrate in Google (28), Apple (19), Adobe (12), among 73 vendors in total.
Vulnerabilities (CVEs)
Showing 40 of 177 CVEs mapped to CWE-787, CISA KEV first, then by CVSS score.
- CVE-2025-24201 — CISA KEV · CVSS 10 critical · EPSS 3.8% · published 2025-03-11
- CVE-2022-42475 — CISA KEV · CVSS 9.8 critical · EPSS 99.4% · published 2023-01-02
- CVE-2023-34048 — CISA KEV · CVSS 9.8 critical · EPSS 99.4% · published 2023-10-25
- CVE-2025-9242 — CISA KEV · CVSS 9.8 critical · EPSS 91.3% · published 2025-09-17
- CVE-2021-31755 — CISA KEV · CVSS 9.8 critical · EPSS 86.5% · published 2021-05-07
- CVE-2023-27997 — CISA KEV · CVSS 9.8 critical · EPSS 85.6% · published 2023-06-13
- CVE-2024-21762 — CISA KEV · CVSS 9.8 critical · EPSS 83.4% · published 2024-02-09
- CVE-2026-111497 — CISA KEV · CVSS 9.8 critical · EPSS 82.6% · published 2026-10-22
- CVE-2026-0300 — CISA KEV · CVSS 9.8 critical · EPSS 31.7% · published 2026-05-06
- CVE-2024-37079 — CISA KEV · CVSS 9.8 critical · EPSS 22.3% · published 2024-06-18
- CVE-2026-34621 — CISA KEV · CVSS 9.8 critical · EPSS 2.1% · published 2026-04-13
- CVE-2025-0282 — CISA KEV · CVSS 9 critical · EPSS 99.9% · published 2025-01-08
- CVE-2021-35211 — CISA KEV · CVSS 9 critical · EPSS 91.1% · published 2021-07-14
- CVE-2023-4863 — CISA KEV · CVSS 8.8 high · EPSS 99.9% · published 2023-09-12
- CVE-2016-4657 — CISA KEV · CVSS 8.8 high · EPSS 63.5% · published 2016-08-25
- CVE-2025-21042 — CISA KEV · CVSS 8.8 high · EPSS 35.5% · published 2025-09-12
- CVE-2023-32435 — CISA KEV · CVSS 8.8 high · EPSS 22.9% · published 2023-06-23
- CVE-2025-14174 — CISA KEV · CVSS 8.8 high · EPSS 22.3% · published 2025-12-12
- CVE-2023-42917 — CISA KEV · CVSS 8.8 high · EPSS 9.2% · published 2023-11-30
- CVE-2023-7024 — CISA KEV · CVSS 8.8 high · EPSS 6.6% · published 2023-12-21
- CVE-2026-87491 — CISA KEV · CVSS 8.8 high · EPSS 3.1% · published 2026-09-09
- CVE-2026-11645 — CISA KEV · CVSS 8.8 high · EPSS 2.4% · published 2026-06-08
- CVE-2026-3909 — CISA KEV · CVSS 8.8 high · EPSS 2.3% · published 2026-03-13
- CVE-2026-53266 — CISA KEV · CVSS 8.8 high · EPSS 0.8% · published 2026-06-25
- CVE-2023-28206 — CISA KEV · CVSS 8.6 high · EPSS 23.2% · published 2023-04-10
- CVE-2025-22225 — CISA KEV · CVSS 8.2 high · EPSS 1.0% · published 2025-03-04
- CVE-2021-4034 — CISA KEV · CVSS 7.8 high · EPSS 94.3% · published 2022-01-28
- CVE-2018-0802 — CISA KEV · CVSS 7.8 high · EPSS 93.2% · published 2018-01-10
- CVE-2016-4656 — CISA KEV · CVSS 7.8 high · EPSS 21.3% · published 2016-08-25
- CVE-2022-0995 — CISA KEV · CVSS 7.8 high · EPSS 8.7% · published 2022-03-25
- CVE-2022-32917 — CISA KEV · CVSS 7.8 high · EPSS 5.6% · published 2022-09-20
- CVE-2024-53197 — CISA KEV · CVSS 7.8 high · EPSS 3.5% · published 2024-12-27
- CVE-2024-53104 — CISA KEV · CVSS 7.8 high · EPSS 3.3% · published 2024-12-02
- CVE-2024-23225 — CISA KEV · CVSS 7.8 high · EPSS 1.4% · published 2024-03-05
- CVE-2024-23296 — CISA KEV · CVSS 7.8 high · EPSS 1.4% · published 2024-03-05
- CVE-2026-44747 — CVSS 9.9 critical · published 2026-07-14
- CVE-2021-39275 — CVSS 9.8 critical · EPSS 39.4% · published 2021-09-16
- CVE-2023-3595 — CVSS 9.8 critical · EPSS 5.5% · published 2023-07-12
- CVE-2025-54957 — CVSS 9.8 critical · EPSS 1.5% · published 2025-10-20
- CVE-2026-65414 — CVSS 9.8 critical · EPSS 0.9% · published 2026-09-14
Affected vendors
- Google — 28 CVEs
- Apple — 19 CVEs
- Adobe — 12 CVEs
- Linux — 8 CVEs
- MediaTek, Inc. — 8 CVEs
- Microsoft — 8 CVEs
- zephyrproject — 8 CVEs
- Fortinet — 7 CVEs
- WatchGuard — 7 CVEs
- Apache Software Foundation — 4 CVEs
- Mozilla — 4 CVEs
- NVIDIA — 3 CVEs
Threat activity
224 tracked threats cite CWE-787; the 25 most recent are listed.
- Multi-vendor vulnerability roundup: Node2Shell Brotli RCE (CVE-2026-111497, actively exploited, CISA KEV), WatchGuard CVE-2026-98432 (CVSS 9.8) and AuthPoint Gateway flaws, Cisco UCS Central CVE-2026-76506, SonicWall GMS CVE-2026-109593/109594 unpatched (EOL)CRITICAL
- Apple September 2026 Security Updates: 273 CVEs incl. actively exploited Screen Sharing auth bypass (CVE-2026-65400) and critical Bluetooth RCE (CVE-2026-65414)CRITICAL
- Multiple Vulnerabilities in Microsoft Edge (prior to 157.0.4341.42) - 27 Chromium CVEs - HK GovCERT A26-11-10HIGH
- Multiple Vulnerabilities in Fortigate NGFW Before V7.4.1 on Siemens RUGGEDCOM APE1808 Devices (SSA-366067)CRITICAL
- Critical Citrix XenServer Vulnerability (CVE-2026-98432, CVE-2026-102703) Could Let Attackers Take Over Virtualization Hosts Without AuthenticationCRITICAL
- Android November 2026 Security Bulletin: Over 200 Vulnerabilities Patched, Including Critical Framework RCE (CVE-2026-58868)CRITICAL
- APT29 (Midnight Blizzard) watering holes target iOS and Android devices with n-day exploit chains (DarkSword, AndroSnitch)HIGH
- Zyxel GS1900 Switch Zero-Day (CVE-2026-107441) Exploited by Kapibala in Red Heron Campaign, ~1,000 Switches CompromisedCRITICAL
- PixelSmash – FFmpeg MagicYUV Decoder Heap Out-of-Bounds Write (CVE-2026-8461)HIGH
- FreeBSoD: LLM-Assisted FreeBSD Kernel Exploit Development Yields Two Jail Escape Chains (CVE-2026-3038)MEDIUM
- TightVNC Viewer 2.8.88 x64 Pre-Authentication RCE via RFB Framebuffer Integer Overflow / Heap Buffer Overflow (No CVE) - PoC ReleasedHIGH
- NCSC CTO Weekly Summary (week ending 2026-09-13): actively exploited Cisco FMC (CVE-2026-20079/20316), PaperCut NG/MF (CVE-2026-81578/82078), MikroTik RouterOS and FortiGate (CVE-2025-25249) flaws; NetScaler SAML bypass (CVE-2026-19490); BlueMoon exploit kitCRITICAL
- Dell PowerProtect Data Domain multiple vulnerabilities fixed (DSA-2026-416, NCSC-2026-0460)CRITICAL
- Pixel 10 0-click exploit chain: Dolby UDC CVE-2025-54957 plus VPU driver mmap flaw (Project Zero)HIGH
- lz1 LZ77 Decompression Stack Buffer Overflow — Public Exploit PoC with Full ROP Chain to Reverse Shell (STAR Labs Summer Pwnables 2025)MEDIUM
- AI-Agent-Driven Intrusion Campaign: Captured Attacker Logs Show Claude opus-4.5 and Codex gpt-5.2-codex Used to Breach 14+ Companies (Livewire CVE-2025-54068, CitrixBleed 2 CVE-2025-5777, Squid, Ghostscript, PwnKit, Dirty Pipe)HIGH
- Philips Hue Bridge over-the-air Zigbee heap buffer overflow leading to RCE (CVE-2026-3555)HIGH
- WatchGuard Fireware OS: 7 Critical Vulnerabilities Allowing Remote Code Execution (CVE-2026-103594, CVE-2026-112710, CVE-2026-112709, CVE-2026-93865, CVE-2026-93857, CVE-2026-93866, CVE-2026-103593)CRITICAL
- Cybersecurity Black Week: LiteLLM 1.107.0 PyPI/Docker supply-chain compromise, PHP2Shell (CVE-2026-109618/109619), Node2Shell (CVE-2026-111497), GitLab CVE-2026-110264, KSMBD flaws and eMudhra emSign intermediate CA key compromiseCRITICAL
- Anthropic Unreleased AI Model Chains Flaws Into Working Chrome, Safari, Android, Windows and Linux Exploits (CVE-2026-33096, CVE-2026-98432)HIGH
- CISA KEV adds Google Brotli (CVE-2026-111497, Node2Shell) and Adobe Commerce/Magento (CVE-2026-48356, PolyShell) flawsCRITICAL
- Coruna and DarkSword iOS Spyware Delivered via Instagram Ads, Hijacked Expired Ad/Analytics Domains and Compromised PrestaShop Stores (DeadTag)HIGH
- CitrixBleed 2 (CVE-2025-5777) Exploited by Anubis Ransomware Affiliates Alongside Valid VPN Credentials and RMM Tool AbuseCRITICAL
- PHP2Shell (CVE-2026-109618 / CVE-2026-109619) Weaponized Following Japanese Real Estate Extortion Campaign by kkkkevin777HIGH
- September 2026 Major Cyber Attacks: ShinyHunters FBIJobs/PeopleSoft (CVE-2026-35273), Clop Leak Site Grav CMS Hijack (CVE-2026-42608), PaperCut AI-Agent Campaign, BlueMoon Zero-Day Chain, NetScaler C2 (CVE-2026-88771)CRITICAL
Mitigations
- Requirements / Language Selection: Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer. Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.
- Architecture and Design / Libraries or Frameworks: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Examples include the Safe C String Library (SafeStr) by Messier and Viega [REF-57], and the Strsafe.h library from Microsoft [REF-56]. These libraries provide safer versions of overflow-prone string-handling functions.
- Operation, Build and Compilation / Environment Hardening: 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.
- Implementation: Consider adhering to the following rules when allocating and managing an application's memory: Double check that the buffer is as large as specified. When using functions that accept a number of bytes to copy, such as strncpy(), be aware that if the destination buffer size is equal to the source buffer size, it may not NULL-terminate the string. Check buffer boundaries if accessing the buffer in a loop and make sure there is no danger of writing past the allocated space. If necessary, truncate all input strings to a reasonable length before passing them to the copy and concatenation functions.
- Operation, Build and Compilation / Environment Hardening: 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…
- Operation / Environment Hardening: Use a CPU and operating system that offers Data Execution Protection (using hardware NX or XD bits) or the equivalent techniques that simulate this feature in software, such as PaX [REF-60] [REF-61]. These techniques ensure that any instruction executed is exclusively at a memory address that is part of the code segment. For more information on these techniques see D3-PSEP (Process Segment Execution Prevention) from D3FEND [REF-1336].
- Implementation: Replace unbounded copy functions with analogous functions that support length arguments, such as strcpy with strncpy. Create these if they are not available.
Source: MITRE CWE, potential mitigations.
Detection methods (MITRE CWE)
- Automated Static Analysis (effectiveness: High): This weakness can often be detected using automated static analysis tools. Many modern tools use data flow analysis or constraint-based techniques to minimize the number of false positives. Automated static analysis generally does not account for environmental considerations when reporting out-of-bounds memory operations. This can make it difficult for users to determine which warnings should be investigated first. For example, an analysis tool might report buffer overflows that originate from…
- Automated Dynamic Analysis: This weakness can be detected using dynamic tools and techniques that interact with the software using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The software's operation may slow down, but it should not become unstable, crash, or generate incorrect results.
- Automated Dynamic Analysis (effectiveness: Moderate): Use tools that are integrated during compilation to insert runtime error-checking mechanisms related to memory safety errors, such as AddressSanitizer (ASan) for C/C++ [REF-1518].
Source: MITRE CWE, detection methods. Threadlinqs detection rules for the threats above are Blue tier and higher.