Skip to content
OpenAdvisories

Weakness (CWE)

CWE-787: Out-of-bounds Write

Base Draft

The product writes data past the end, or before the beginning, of the intended buffer.

How to prevent it (7 mitigations)
  1. Requirements

    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.

  2. Architecture and Design

    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.

  3. 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.

  4. 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.

  5. 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].

  6. Operation

    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].

  7. 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-787

238 results · Clear filters · Feed

  • High 7.8
    CVE-2024-53104 Exploited Public exploit

    media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format

    In the Linux kernel, the following vulnerability has been resolved: media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format This can lead to out of bounds writes since frames of this type were not taken into account when calculating …

    KEV Feb 5, 2025
  • High 8.8
    CVE-2018-9411 Public exploit

    In decrypt of ClearKeyCasPlugin.cpp there is a possible out-of-bounds write due to a missing bounds check. This could l…

  • High 7.8
    CVE-2018-9338 Public exploit

    In ResStringPool::setTo of ResourceTypes.cpp, there is a possible out of bounds write due to a missing bounds check. Th…

  • High 7.5
    CVE-2023-29929 Public exploit

    Buffer Overflow vulnerability found in Kemptechnologies Loadmaster before v.7.2.60.0 allows a remote attacker to casue …

  • Medium 6.3
    CVE-2023-48194 Public exploit

    Vulnerability in Tenda AC8v4 .V16.03.34.09 due to sscanf and the last digit of s8 being overwritten with \x0. After exe…

  • High 8.8
    CVE-2024-39840 Public exploit

    Factorio before 1.1.101 allows a crafted server to execute arbitrary code on clients via a custom map that leverages th…

  • Medium 5.9
    CVE-2024-27815 Public exploit

    An out-of-bounds write issue was addressed with improved input validation. This issue is fixed in iOS 17.5 and iPadOS 1…

  • High 8.6
    CVE-2024-36114 Public exploit

    Decompressors can crash the JVM and leak memory content in Aircompressor

    Aircompressor is a library with ports of the Snappy, LZO, LZ4, and Zstandard compression algorithms to Java. All decompressor implementations of Aircompressor (LZ4, LZO, Snappy, Zstandard) can crash the JVM for certain input, and in some cases also leak the c…

  • High 8.3
    CVE-2024-4761 Exploited Public exploit EPSS 11%

    Out of bounds write in V8 in Google Chrome prior to 124.0.6367.207 allowed a remote attacker to perform an out of bound…

    KEV May 16, 2024
  • Medium 6.5
    CVE-2024-23709 Public exploit

    In multiple locations, there is a possible out of bounds write due to a heap buffer overflow. This could lead to remote…

  • Critical 9.8
    CVE-2023-42115 Public exploit EPSS 12%

    Exim AUTH Out-Of-Bounds Write Remote Code Execution Vulnerability

    Exim AUTH Out-Of-Bounds Write Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Exim. Authentication is not required to exploit this vulnerability. The specific flaw exists w…

  • High 7.3
    CVE-2024-2961 Public exploit EPSS 88%

    The iconv() function in the GNU C Library versions 2.39 and older may overflow the output buffer passed to it by up to …

  • Critical 9.8
    CVE-2024-29943 Public exploit EPSS 23%

    An attacker was able to perform an out-of-bounds read or write on a JavaScript object by fooling range-based bounds che…

  • Critical 9.3
    CVE-2023-42789 Public exploit

    A out-of-bounds write vulnerability in Fortinet FortiOS 7.4.0 through 7.4.1, FortiOS 7.2.0 through 7.2.5, FortiOS 7.0.0…

  • Critical 9.8
    CVE-2024-0039 Public exploit

    In attp_build_value_cmd of att_protocol.cc, there is a possible out of bounds write due to a missing bounds check. This…

  • High 7.8
    CVE-2024-23296 Exploited Public exploit

    A memory corruption issue was addressed with improved validation. This issue is fixed in iOS 16.7.8 and iPadOS 16.7.8, …

    KEV Mar 6, 2024
  • Critical 9.8
    CVE-2024-20017 Public exploit EPSS 47%

    In wlan service, there is a possible out of bounds write due to improper input validation. This could lead to remote co…

  • High 7.0
    CVE-2024-25423 Public exploit

    An issue in MAXON CINEMA 4D R2024.2.0 allows a local attacker to execute arbitrary code via a crafted c4d_base.xdl64 fi…

  • High 7.4
    CVE-2024-0023 Public exploit

    In ConvertRGBToPlanarYUV of Codec2BufferUtils.cpp, there is a possible out of bounds write due to an incorrect bounds c…

  • Critical 9.6
    CVE-2024-21762 Exploited · Ransomware Public exploit EPSS 85%

    A out-of-bounds write vulnerability in Fortinet FortiOS 7.4.0 through 7.4.2, FortiOS 7.2.0 through 7.2.6, FortiOS 7.0.0…

    KEV Feb 9, 2024
  • High 7.8
    CVE-2024-25004 Public exploit

    KiTTY versions 0.76.1.13 and before is vulnerable to a stack-based buffer overflow via the username, occurs due to insu…

  • High 7.8
    CVE-2024-25003 Public exploit

    KiTTY versions 0.76.1.13 and before is vulnerable to a stack-based buffer overflow via the hostname, occurs due to insu…

  • High 7.5
    CVE-2023-6387 Public exploit

    Incorrect buffer parsing in Bluetooth LE sample code may lead to buffer overflow

    A potential buffer overflow exists in the Bluetooth LE HCI CPC sample application in the Gecko SDK which may result in a denial of service or remote code execution

  • Medium 6.5
    CVE-2024-0741 Public exploit

    An out of bounds write in ANGLE could have allowed an attacker to corrupt memory leading to a potentially exploitable c…

  • High 8.8
    CVE-2024-0519 Exploited Public exploit

    Out of bounds memory access in V8 in Google Chrome prior to 120.0.6099.224 allowed a remote attacker to potentially exp…

    KEV Jan 17, 2024
  • Critical 9.8
    CVE-2023-31488 Public exploit

    Hyland Perceptive Filters releases before 2023-12-08 (e.g., 11.4.0.2647), as used in Cisco IronPort Email Security Appl…

  • High 7.8
    CVE-2023-5180 Public exploit

    Out-of-bounds Write vulnerability exists in ODA Drawings SDK before 2024.12

    An issue was discovered in Open Design Alliance Drawings SDK before 2024.12. A corrupted value of number of sectors used by the Fat structure in a crafted DGN file leads to an out-of-bounds write. An attacker can leverage this vulnerability to execute code in…

  • High 8.8
    CVE-2023-7024 Exploited Public exploit

    Heap buffer overflow in WebRTC in Google Chrome prior to 120.0.6099.129 allowed a remote attacker to potentially exploi…

    KEV Jan 2, 2024
  • High 7.8
    CVE-2023-6931 Public exploit

    Out-of-bounds write in Linux kernel's Performance Events system component

    A heap out-of-bounds write vulnerability in the Linux kernel's Performance Events system component can be exploited to achieve local privilege escalation. A perf_event's read_size can overflow, leading to an heap out-of-bounds increment or write in perf_read_…

  • Unscored —
    CVE-2023-45878 Public exploit EPSS 63%

    GibbonEdu Gibbon version 25.0.1 and before allows Arbitrary File Write because rubrics_visualise_saveAjax.phps does not…

  • Medium 6.5
    CVE-2023-31419 Public exploit EPSS 61%

    Elasticsearch StackOverflow vulnerability

    A flaw was discovered in Elasticsearch, affecting the _search API that allowed a specially crafted query string to cause a Stack Overflow and ultimately a Denial of Service.

  • High 7.8
    CVE-2023-5717 Public exploit

    Out-of-bounds write in Linux kernel's Linux Kernel Performance Events (perf) component

    A heap out-of-bounds write vulnerability in the Linux kernel's Linux Kernel Performance Events (perf) component can be exploited to achieve local privilege escalation. If perf_read_group() is called while an event's sibling_list is smaller than its child's si…

  • High 8.0
    CVE-2023-46136 Public exploit

    Werkzeug vulnerable to high resource usage when parsing multipart/form-data containing a large part with CR/LF character at the beginning

    Werkzeug is a comprehensive WSGI web application library. In versions on the 3.x branch prior to 3.0.1 and on the 2.x branch prior to 2.3.8, if an upload of a file that starts with CR or LF and then is followed by megabytes of data without these characters: a…

  • High 7.8
    CVE-2022-3699 Public exploit

    A privilege escalation vulnerability was reported in the Lenovo HardwareScanPlugin prior to version 1.3.1.2 and Lenovo …

  • High 8.8
    CVE-2023-38545 Public exploit EPSS 78%

    This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy handshake. When curl is asked to pass along the h…

  • High 8.8
    CVE-2023-5217 Exploited Public exploit EPSS 49%

    Electron affected by libvpx's heap buffer overflow in vp8 encoding

    Heap buffer overflow in vp8 encoding in libvpx in Google Chrome prior to 117.0.5938.132 and libvpx 1.13.1 allowed a remote attacker to potentially exploit heap corruption via a crafted HTML page. (Chromium security severity: High)

    KEV Oct 2, 2023
  • High 8.8
    CVE-2023-4863 Exploited Public exploit EPSS 100%

    libwebp: OOB write in BuildHuffmanTable

    Heap buffer overflow in libwebp in Google Chrome prior to 116.0.5845.187 and libwebp 1.3.2 allowed a remote attacker to perform an out of bounds memory write via a crafted HTML page. (Chromium security severity: Critical)

    KEV Sep 13, 2023
  • High 7.5
    CVE-2023-30800 Public exploit

    MikroTik RouterOS Web Interface Heap Corruption

    The web server used by MikroTik RouterOS version 6 is affected by a heap memory corruption issue. A remote and unauthenticated attacker can corrupt the server's heap memory by sending a crafted HTTP request. As a result, the web interface crashes and is immed…

  • High 8.8
    CVE-2023-32560 Public exploit EPSS 99%

    An attacker can send a specially crafted message to the Wavelink Avalanche Manager, which could result in service disru…

  • High 7.8
    CVE-2023-35001 Public exploit

    Linux Kernel nftables Out-Of-Bounds Read/Write Vulnerability

    Linux Kernel nftables Out-Of-Bounds Read/Write Vulnerability; nft_byteorder poorly handled vm register contents when CAP_NET_ADMIN is in any user or network namespace