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,190 results · Feed

  • Unscored —

    A vulnerability has been identified in PADS Standard/Plus Viewer (All versions). The affected application contains an o…

  • Unscored —

    A vulnerability has been identified in PADS Standard/Plus Viewer (All versions). The affected application contains an o…

  • Unscored —

    A crafted JPEG image may lead the JPEG reader to underflow its data pointer, allowing user-controlled data to be writte…

  • Unscored —

    A heap out-of-bounds write may heppen during the handling of Huffman tables in the PNG reader. This may lead to data co…

  • Unscored —

    A crafted 16-bit grayscale PNG image may lead to a out-of-bounds write in the heap area. An attacker may take advantage…

  • Medium 6.4

    NVIDIA DGX A100 contains a vulnerability in SBIOS in the IpSecDxe, where a user with elevated privileges and a precondi…

  • Medium 6.7

    NVIDIA DGX A100 contains a vulnerability in SBIOS in the SmbiosPei, which may allow a highly privileged local attacker …

  • High 7.8

    Out-of-bounds Write in vim/vim

    Out-of-bounds Write in GitHub repository vim/vim prior to 9.0.

  • Critical 9.8
    CVE-2022-2274 Public exploit EPSS 48%

    RSA implementation bug in AVX512IFMA instructions

    The OpenSSL 3.0.4 release introduced a serious bug in the RSA implementation for X86_64 CPUs supporting the AVX512IFMA instructions. This issue makes the RSA implementation with 2048 bit private keys incorrect on such machines and memory corruption will happe…

  • Unscored —

    When performing the inference shape operation of the Tile operator, if the input data type is not int or int32, it will…

  • High 7.8

    Out-of-bounds Write in vim/vim

    Out-of-bounds Write in GitHub repository vim/vim prior to 8.2.

  • High 7.5

    Espressif Bluetooth Mesh Stack Vulnerable to Out-of-bounds Write leading to memory buffer corruption

    ESP-IDF is the official development framework for Espressif SoCs. In Espressif’s Bluetooth Mesh SDK (`ESP-BLE-MESH`), a memory corruption vulnerability can be triggered during provisioning, because there is no check for the `SegN` field of the Transaction Sta…

  • High 7.8

    Out-of-bounds Write in vim/vim

    Out-of-bounds Write in GitHub repository vim/vim prior to 8.2.

  • High 7.8

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

    Adobe Animate version 22.0.5 (and earlier) is 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 that a victim must open a …

  • High 7.8

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

    Adobe InCopy versions 17.2 (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.2 (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 SVG File Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability

    Adobe InCopy versions 17.2 (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.2.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 i…

  • High 7.8

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

    Adobe InDesign versions 17.2.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 i…

  • High 7.8

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

    Adobe InDesign versions 17.2.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 i…

  • High 7.8

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

    Adobe InDesign versions 17.2.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 i…

  • High 7.8

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

    Adobe InDesign versions 17.2.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 i…

  • High 7.8

    Adobe Illustrator Out-of-bounds Write could lead to Arbitrary code execution

    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 After Effects Memory Corruption could lead to Arbitrary Code Execution

    Adobe After Effects versions 22.0 (and earlier) and 18.4.2 (and earlier) are affected by an Out-of-bounds Write vulnerability due to insecure handling of a malicious file, potentially resulting in arbitrary code execution in the context of the current user. U…

  • High 7.8

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

    Adobe Bridge version 12.0.1 (and earlier versions) is 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 that a victim must…

  • High 7.8

    Adobe Bridge PCX Out-of-bounds Write Remote Code Execution Vulnerability

    Adobe Bridge version 12.0.1 (and earlier versions) is 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 that a victim must…

  • High 7.8

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

    Adobe Bridge version 12.0.1 (and earlier versions) is 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 that a victim must…

  • High 7.8

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

    Adobe Bridge version 12.0.1 (and earlier versions) is 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 that a victim must…

  • High 7.8

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

    Adobe Bridge version 12.0.1 (and earlier versions) is 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 that a victim must…

  • High 7.8

    Adobe Bridge Font Out-of-bounds Write Remote Code Execution Vulnerability

    Adobe Bridge version 12.0.1 (and earlier versions) is 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 that a victim must…

  • High 7.8

    Adobe Bridge Font Out-of-bounds Write Remote Code Execution Vulnerability

    Adobe Bridge version 12.0.1 (and earlier versions) is 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 that a victim must…

  • High 7.8

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

    Adobe Bridge version 12.0.1 (and earlier versions) is 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 that a victim must…

  • High 7.8

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

    Adobe Bridge version 12.0.1 (and earlier versions) is 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 that a victim must…

  • High 7.8

    Adobe Media Encoder Memory Corruption Vulnerability could lead to Remote Code Execution

    Adobe Media Encoder versions 22.0, 15.4.2 (and earlier) are affected by an Out-of-bounds Write vulnerability. An unauthenticated attacker could leverage this vulnerability to achieve arbitrary code execution in the context of the current user. Exploitation of…

  • High 7.8

    Adobe Prelude Corruption could lead to Arbitrary code execution

    Adobe Prelude version 22.1.1 (and earlier) is affected by an Out-of-bounds Write vulnerability due to insecure handling of a malicious file, potentially resulting in arbitrary code execution in the context of the current user. User interaction is required to …

  • High 7.8

    Adobe InDesign Memory Corruption Vulnerability Could Lead to Arbitrary Code Execution

    Adobe InDesign versions 16.3 (and earlier), and 16.3.1 (and earlier) is affected by an Out-of-bounds Write vulnerability due to insecure handling of a malicious TIFF file, potentially resulting in arbitrary code execution in the context of the current user. U…

  • High 7.5

    Uses of deprecated API can be used to cause DoS in user-facing endpoints in Argo Events

    Argo Events is an event-driven workflow automation framework for Kubernetes. Prior to version 1.7.1, several `HandleRoute` endpoints make use of the deprecated `ioutil.ReadAll()`. `ioutil.ReadAll()` reads all the data into memory. As such, an attacker who sen…

  • High 7.8

    Adobe Premiere Pro M4A file memory corruption vulnerability could lead to remote code execution

    Adobe Premiere Pro version 15.4 (and earlier) are affected by a memory corruption vulnerability. An unauthenticated attacker could leverage this vulnerability to achieve arbitrary code execution in the context of the current user. Exploitation of this issue r…

  • High 7.8

    Adobe Media Encoder M4A file memory corruption vulnerability could lead to remote code execution

    Adobe Media Encoder version 15.4 (and earlier) are affected by a memory corruption vulnerability. An unauthenticated attacker could leverage this vulnerability to achieve arbitrary code execution in the context of the current user. Exploitation of this issue …

  • High 7.8

    Adobe Media Encoder M4A file memory corruption vulnerability could lead to remote code execution

    Adobe Media Encoder version 15.4 (and earlier) are affected by a memory corruption vulnerability. An unauthenticated attacker could leverage this vulnerability to achieve arbitrary code execution in the context of the current user. Exploitation of this issue …