Skip to content
OpenAdvisories

Weakness (CWE)

CWE-122: Heap-based Buffer Overflow

Variant Draft

The product writes past the end of a buffer that was allocated on the heap.

How to prevent it (7 mitigations)
  1. Pre-design: Use a language or compiler that performs automatic bounds checking.

  2. Architecture and Design

    Use an abstraction library to abstract away risky APIs. Not a complete solution.

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

  5. Implementation

    Implement and perform bounds checking on input.

  6. Implementation

    Do not use dangerous functions such as gets. Look for their safe equivalent, which checks for the boundary.

  7. Operation

    Use OS-level preventative functionality. This is not a complete solution, but it provides some defense in depth.

Source: MITRE CWE-122

650 results · Clear filters · Feed

  • Medium 6.5

    Integer underflow in Content Distribution Service UDP handler

    An integer underflow in the UDP command handler of the TeamViewer DEX Client (former 1E Client) - Content Distribution Service (NomadBranch.exe) prior version 26.1 for Windows allows an adjacent network attacker to trigger a heap-based buffer overflow and cau…

  • Medium 5.5

    bulk_extractor has Heap-based Buffer Overflow vulnerability

    `bulk_extractor` is a digital forensics exploitation tool. Starting in version 1.4, `bulk_extractor`’s embedded unrar code has a heap‑buffer‑overflow in the RAR PPM LZ decoding path. A crafted RAR inside a disk image causes an out‑of‑bounds write in `Unpack::…

  • Medium 6.1

    iccDEV has a heap-buffer-overflow in icXmlParseTextString()

    iccDEV provides a set of libraries and tools that allow for the interaction, manipulation, and application of ICC color management profiles. Prior to version 2.3.1.2, a heap buffer over-read when the strlen() function attempts to read a non-null-terminated bu…

  • Medium 6.5

    Out-of-bounds write in is-Engine

    Out-of-bounds Write, Heap-based Buffer Overflow vulnerability in Is-Daouda is-Engine.This issue affects is-Engine: before 3.3.4.

  • Medium 5.5

    FreeRDP has heap-buffer-overflow in Glyph_Alloc

    FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to version 3.21.0, FastGlyph parsing trusts `cbData`/remaining length and never validates against the minimum size implied by `cx/cy`. A malicious server can trigger a client‑side global b…

  • Medium 6.3

    quickjs-ng quickjs quickjs.c js_typed_array_constructor_ta heap-based overflow

    A flaw has been found in quickjs-ng quickjs up to 0.11.0. Affected by this vulnerability is the function js_typed_array_constructor_ta of the file quickjs.c. This manipulation causes heap-based buffer overflow. The attack is possible to be carried out remotel…

  • Medium 5.3

    Mapnik dbfile.cpp string_value heap-based overflow

    A security vulnerability has been detected in Mapnik up to 4.2.0. This issue affects the function mapnik::dbf_file::string_value of the file plugins/input/shape/dbfile.cpp. Such manipulation leads to heap-based buffer overflow. The attack must be carried out …

  • Medium 5.3

    BYVoid OpenCC MaxMatchSegmentation.cpp MaxMatchSegmentation heap-based overflow

    A weakness has been identified in BYVoid OpenCC up to 1.1.9. This vulnerability affects the function opencc::MaxMatchSegmentation of the file src/MaxMatchSegmentation.cpp. This manipulation causes heap-based buffer overflow. The attack is restricted to local …

  • Medium 5.3

    raysan5 raylib rtext.c GenImageFontAtlas heap-based overflow

    A vulnerability was determined in raysan5 raylib up to 909f040. Affected by this vulnerability is the function GenImageFontAtlas of the file src/rtext.c. Executing a manipulation can lead to heap-based buffer overflow. The attack can only be executed locally.…

  • Medium 6.5

    A heap overflow in the avi_parse_input_file() function of GPAC v2.4.0 allows attackers to cause a Denial of Service (Do…

  • Medium 5.5

    A heap overflow in the ghi_dmx_declare_opid_bin() function of GPAC v2.4.0 allows attackers to cause a Denial of Service…

  • Medium 5.5

    A heap overflow in the vorbis_to_intern() function of GPAC v2.4.0 allows attackers to cause a Denial of Service (DoS) v…

  • Medium 5.5

    A heap overflow in the uncv_parse_config() function of GPAC v2.4.0 allows attackers to cause a Denial of Service (DoS) …

  • Medium 6.8

    FreeRDP has a heap-buffer-overflow in drive_process_irp_read

    FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to 3.20.1, a heap-buffer-overflow occurs in drive read when a server-controlled read length is used to read file data into an IRP output stream buffer without a hard upper bound, allowing …

  • Medium 6.7

    Windows Virtualization-Based Security (VBS) Enclave Elevation of Privilege Vulnerability

    Heap-based buffer overflow in Windows Virtualization-Based Security (VBS) Enclave allows an authorized attacker to elevate privileges locally.

  • Medium 6.3

    quickjs-ng quickjs quickjs.c js_typed_array_sort heap-based overflow

    A vulnerability was identified in quickjs-ng quickjs up to 0.11.0. This issue affects the function js_typed_array_sort of the file quickjs.c. The manipulation leads to heap-based buffer overflow. Remote exploitation of the attack is possible. The exploit is p…

  • Medium 5.7

    CryptoLib Vulnerable to Heap Buffer Overflow in MariaDB SA Hexstring Conversion

    CryptoLib provides a software-only solution using the CCSDS Space Data Link Security Protocol - Extended Procedures (SDLS-EP) to secure communications between a spacecraft running the core Flight System (cFS) and a ground station. Prior to version 1.4.3, the …

  • Medium 6.6

    Heap Buffer Overflow in iccDEV ToneMap Parser

    iccDEV provides a set of libraries and tools that allow for the interaction, manipulation, and application of ICC color management profiles. Prior to version 2.3.1.2, iccDEV is vulnerable to heap buffer overflow in the ToneMap parser. This issue has been patc…

  • Medium 6.1

    iccDEV has unicode buffer overflow in CIccTagTextDescription

    iccDEV provides a set of libraries and tools that allow for the interaction, manipulation, and application of International Color Consortium (ICC) color management profiles. A vulnerability present in versions prior to 2.3.1.2 affects users of the iccDEV libr…

  • Medium 6.1

    iccDEV has heap buffer overflow in CIccTagLut16::Validate()

    iccDEV provides a set of libraries and tools that allow for the interaction, manipulation, and application of International Color Consortium (ICC) color management profiles. A vulnerability present in versions prior to 2.3.1.2 affects users of the iccDEV libr…

  • Medium 6.1

    iccDEV has heap buffer overflow in CIccTagLut8::Validate()

    iccDEV provides a set of libraries and tools that allow for the interaction, manipulation, and application of International Color Consortium (ICC) color management profiles. A vulnerability present in versions prior to 2.3.1.2 affects users of the iccDEV libr…

  • Medium 6.1

    iccDEV has Out-of-bounds Read, Heap-based Buffer Overflow and Improper Null Termination

    iccDEV provides a set of libraries and tools for working with ICC color management profiles. Versions 2.3.1.1 and below are vulnerable to Out-of-bounds Read, Heap-based Buffer Overflow and Improper Null Termination through its CIccTagText::Read function. This…

  • Medium 5.3

    floooh sokol sokol_gfx.h _sg_pipeline_common_init heap-based overflow

    A security flaw has been discovered in floooh sokol up to 33e2271c431bf21de001e972f72da17a984da932. This vulnerability affects the function _sg_pipeline_common_init in the library sokol_gfx.h. Performing manipulation results in heap-based buffer overflow. The…

  • Medium 5.3

    WebAssembly Binaryen wasm-binary.cpp readExport heap-based overflow

    A vulnerability was determined in WebAssembly Binaryen up to 125. Affected by this issue is the function WasmBinaryReader::readExport of the file src/wasm/wasm-binary.cpp. This manipulation causes heap-based buffer overflow. It is possible to launch the attac…

  • Medium 4.8

    Capstone doesn't check Skipdata length, leading to cs_insn.bytes heap buffer overflow

    Capstone is a disassembly framework. In versions 6.0.0-Alpha5 and prior, Skipdata length is not bounds-checked, so a user-provided skipdata callback can make cs_disasm/cs_disasm_iter memcpy more than 24 bytes into cs_insn.bytes, causing a heap buffer overflow…

  • Medium 6.5

    In initDecoder of C2SoftDav1dDec.cpp, there is a possible out of bounds read due to a heap buffer overflow. This could …

  • Medium 6.7
  • Medium 6.5

    A heap overflow in the MatroskaFile::createRTPSinkForTrackNumber() function of Live555 Streaming Media v2018.09.02 allo…

  • Medium 5.5

    MLX has heap-buffer-overflow in load()

    MLX is an array framework for machine learning on Apple silicon. Prior to version 0.29.4, there is a heap buffer overflow in mlx::core::load() when parsing malicious NumPy .npy files. Attacker-controlled file causes 13-byte out-of-bounds read, leading to cras…

  • Medium 6.8

    A heap corruption vulnerability exists in the Advantech TP-3250 printer driver's DrvUI_x64_ADVANTECH.dll (v0.3.9200.207…

  • Medium 4.0

    A heap-use-after-free vulnerability exists in airpig2011 IEC104 thru Commit be6d841 (2019-07-08). During multi-threaded…

  • Medium 6.7

    In wlan AP driver, there is a possible out of bounds write due to an incorrect bounds check. This could lead to local e…

  • Medium 4.2

    In wlan AP driver, there is a possible out of bounds write due to an incorrect bounds check. This could lead to local e…

  • Medium 4.2

    In wlan AP driver, there is a possible out of bounds write due to an incorrect bounds check. This could lead to local e…

  • Medium 4.2

    In wlan AP driver, there is a possible out of bounds write due to an incorrect bounds check. This could lead to local e…

  • Medium 5.3

    Kamailio Configuration File rvalue.c rve_destroy heap-based overflow

    A security vulnerability has been detected in Kamailio 5.5. Impacted is the function rve_destroy of the file src/core/rvalue.c of the component Configuration File Handler. The manipulation leads to heap-based buffer overflow. The attack must be carried out lo…

  • Medium 6.8

    Heap Memory Corruption Vulnerability

    Heap-based Buffer Overflow vulnerability in ABB Terra AC wallbox (UL40/80A), ABB Terra AC wallbox (UL32A), ABB Terra AC wallbox (MID/ CE) -Terra AC MID, ABB Terra AC wallbox (MID/ CE) -Terra AC Juno CE, ABB Terra AC wallbox (MID/ CE) -Terra AC PTB, ABB Terra …

  • Medium 4.5

    bftpd Configuration File options.c expand_groups heap-based overflow

    A weakness has been identified in bftpd up to 6.2. Impacted is the function expand_groups of the file options.c of the component Configuration File Handler. Executing a manipulation can lead to heap-based buffer overflow. It is possible to launch the attack o…

  • Medium 5.5

    Bridge | Heap-based Buffer Overflow (CWE-122)

    Bridge versions 14.1.8, 15.1.1 and earlier are affected by a Heap-based Buffer Overflow vulnerability that could lead to memory exposure. An attacker could leverage this vulnerability to disclose sensitive information stored in memory. Exploitation of this is…

  • Medium 6.5

    A heap-based buffer overflow vulnerability in Fortinet FortiAnalyzer 7.6.0 through 7.6.2, FortiAnalyzer 7.4.0 through 7…