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

6,181 results · Feed

  • High 8.8
    CVE-2023-43641 EPSS 17%

    libcue vulnerable to out-of-bounds array access

    libcue provides an API for parsing and extracting data from CUE sheets. Versions 2.2.1 and prior are vulnerable to out-of-bounds array access. A user of the GNOME desktop environment can be exploited by downloading a cue sheet from a malicious webpage. Becaus…

  • Medium 4.7

    Mali GPU Kernel Driver Allows Improper GPU Memory Processing Operations

    A local non-privileged user can make improper GPU processing operations to access a limited amount outside of buffer bounds or to exploit a software race condition. If the system’s memory is carefully prepared by the user, then this in turn could give them ac…

  • Medium 6.7
  • Medium 6.7
  • Medium 6.7
  • Medium 6.7
  • Medium 6.7
  • Medium 5.9

    Bluetooth LE segmented 'prepare write response' packet may lead to out-of-bounds memory access

    Forcing the Bluetooth LE stack to segment 'prepare write response' packets can lead to an out-of-bounds memory access.

  • 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
  • Medium 6.3

    Privileges Memory Corruption (Out-of-bound write)

    An attacker with standard privileges on macOS when requesting administrator privileges from the application can submit input which causes a buffer overflow resulting in a crash of the application. This could make the application unavailable and allow reading …

  • High 7.5

    D-Link DIR-619L B1 2.02 is vulnerable to Buffer Overflow via formLanguageChange function.

  • Medium 6.6
    CVE-2023-20109 Exploited

    A vulnerability in the Cisco Group Encrypted Transport VPN (GET VPN) feature of Cisco IOS Software and Cisco IOS XE Sof…

    KEV Oct 10, 2023
  • Critical 9.8

    Memory safety bugs present in Firefox 117, Firefox ESR 115.2, and Thunderbird 115.2. Some of these bugs showed evidence…

  • Critical 9.8

    A compromised content process could have provided malicious data to `FilterNodeD2D1` resulting in an out-of-bounds writ…

  • High 7.0

    Kernel: netfilter: potential slab-out-of-bound access due to integer underflow

    An array indexing vulnerability was found in the netfilter subsystem of the Linux kernel. A missing macro could lead to a miscalculation of the `h->nets` array offset, providing attackers with the primitive to arbitrarily increment/decrement a memory buffer o…

  • Critical 9.8

    An out-of-bounds write vulnerability exists in the allocate_buffer_for_jpeg_decoding functionality of Accusoft ImageGea…

  • High 7.8

    Linux: buffer overrun in netback due to unusual packet

    The fix for XSA-423 added logic to Linux'es netback driver to deal with a frontend splitting a packet in a way such that not all of the headers would come in one piece. Unfortunately the logic introduced there didn't account for the extreme case of the entire…

  • High 7.8

    Delta Electronics DIAScreen Out-of-bounds Write

    Delta Electronics DIAScreen may write past the end of an allocated buffer while parsing a specially crafted input file. This could allow an attacker to execute code in the context of the current process.

  • High 8.1

    Vyper vulnerable to memory corruption in certain builtins utilizing `msize`

    Vyper is a Pythonic Smart Contract Language for the Ethereum Virtual Machine (EVM). In version 0.3.9 and prior, under certain conditions, the memory used by the builtins `raw_call`, `create_from_blueprint` and `create_copy_of` can be corrupted. For `raw_call`…

  • High 7.5

    FreeSWITCH allows remote users to trigger out of bounds write by offering an ICE candidate with unknown component ID

    FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a software implementation that runs on any commodity hardware. Prior to version 1.10.10, FreeSWITCH allows remote users to trigger out of b…

  • Critical 9.8

    Wibu: Buffer Overflow in CodeMeter Runtime

    A heap buffer overflow vulnerability in Wibu CodeMeter Runtime network service up to version 7.60b allows an unauthenticated, remote attacker to achieve RCE and gain full access of the host system.

  • High 7.8
    CVE-2023-26369 Exploited Public exploit

    [Google Project Zero] Adobe Acrobat DC OOBW 0-day actively exploited in the wild

    Acrobat Reader versions 23.003.20284 (and earlier), 20.005.30516 (and earlier) and 20.005.30514 (and earlier) are affected by an out-of-bounds write vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation o…

    KEV Sep 14, 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.8

    A vulnerability has been identified in Parasolid V35.0 (All versions < V35.0.260), Parasolid V35.1 (All versions < V35.…

  • High 7.8

    A vulnerability has been identified in Parasolid V34.1 (All versions < V34.1.258), Parasolid V35.0 (All versions < V35.…

  • High 7.8

    A vulnerability has been identified in JT2Go (All versions < V14.3.0.1), Teamcenter Visualization V13.3 (All versions <…

  • High 7.5

    Memory Corruption vulnerability in SAP CommonCryptoLib

    SAP CommonCryptoLib allows an unauthenticated attacker to craft a request, which when submitted to an open port causes a memory corruption error in a library which in turn causes the target component to crash making it unavailable. There is no ability to view…

  • High 7.8

    Adobe InCopy Font Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability

    Adobe InCopy versions 17.1 (and earlier) and 16.4.1 (and earlier) are affected by an out-of-bounds write vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interaction in th…

  • High 7.8

    Adobe InCopy Font Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability

    Adobe InCopy versions 17.1 (and earlier) and 16.4.1 (and earlier) are affected by an out-of-bounds write vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interaction in th…

  • High 7.8

    Adobe InDesign Font Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability

    Adobe InDesign versions 17.1 (and earlier) and 16.4.1 (and earlier) are affected by an out-of-bounds write vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interaction in …

  • High 7.8

    Adobe InDesign Font Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability

    Adobe InDesign versions 17.1 (and earlier) and 16.4.1 (and earlier) are affected by an out-of-bounds write vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interaction in …

  • High 8.8

    Memory safety bugs fixed in Firefox 117, Firefox ESR 115.2, and Thunderbird 115.2

    Memory safety bugs present in Firefox 116, Firefox ESR 115.1, and Thunderbird 115.1. Some of these bugs showed evidence of memory corruption and we presume that with enough effort some of these could have been exploited to run arbitrary code. This vulnerabili…

  • 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 7.8

    Adobe Illustrator Font Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability

    Adobe Illustrator versions 26.0.2 (and earlier) and 25.4.5 (and earlier) are affected by an out-of-bounds write vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interactio…

  • High 7.8

    Adobe Illustrator Font Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability

    Adobe Illustrator versions 26.0.2 (and earlier) and 25.4.5 (and earlier) are affected by an out-of-bounds write vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interactio…

  • High 7.8

    Adobe Illustrator Font Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability

    Adobe Illustrator versions 26.0.2 (and earlier) and 25.4.5 (and earlier) are affected by an out-of-bounds write vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interactio…

  • High 7.8

    Adobe Illustrator SVG File Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability

    Adobe Illustrator versions 26.0.2 (and earlier) and 25.4.5 (and earlier) are affected by an out-of-bounds write vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interactio…

  • High 7.8

    Adobe Illustrator Font Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability

    Adobe Illustrator versions 26.0.2 (and earlier) and 25.4.5 (and earlier) are affected by an out-of-bounds write vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interactio…

  • High 7.8

    Adobe Illustrator Font Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability

    Adobe Illustrator versions 26.0.2 (and earlier) and 25.4.5 (and earlier) are affected by an out-of-bounds write vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interactio…

  • High 7.8

    Adobe Illustrator Font Parsing Out-of-bounds Write Remote Code Execution Vulnerability

    Adobe Illustrator versions 26.0.2 (and earlier) and 25.4.5 (and earlier) are affected by an out-of-bounds write vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interactio…