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

4,090 results · Feed

  • High 7.8

    Windows Bluetooth Service Elevation of Privilege Vulnerability

    Heap-based buffer overflow in Windows Bluetooth Service allows an authorized attacker to elevate privileges locally.

  • High 8.0

    Remote Desktop Client Remote Code Execution Vulnerability

    Heap-based buffer overflow in Remote Desktop Client allows an authorized attacker to execute code over a network.

  • High 7.8

    Windows Media Remote Code Execution Vulnerability

    Heap-based buffer overflow in Windows Media allows an authorized attacker to execute code locally.

  • High 7.8

    Windows USB Print Driver Elevation of Privilege Vulnerability

    Integer overflow or wraparound in Windows USB Print Driver allows an authorized attacker to elevate privileges locally.

  • High 8.8

    Windows Telephony Service Remote Code Execution Vulnerability

    Heap-based buffer overflow in Windows Telephony Service allows an unauthorized attacker to execute code over a network.

  • High 8.8

    Windows Telephony Service Remote Code Execution Vulnerability

    Heap-based buffer overflow in Windows Telephony Service allows an unauthorized attacker to execute code over a network.

  • High 8.8

    Windows Telephony Service Remote Code Execution Vulnerability

    Heap-based buffer overflow in Windows Telephony Service allows an unauthorized attacker to execute code over a network.

  • High 7.8

    Microsoft Excel Remote Code Execution Vulnerability

    Heap-based buffer overflow in Microsoft Office Excel allows an unauthorized attacker to execute code locally.

  • High 7.0

    Windows Local Security Authority (LSA) Elevation of Privilege Vulnerability

    Heap-based buffer overflow in Windows Local Security Authority (LSA) allows an authorized attacker to elevate privileges locally.

  • High 8.8

    Windows Telephony Service Remote Code Execution Vulnerability

    Heap-based buffer overflow in Windows Telephony Service allows an unauthorized attacker to execute code over a network.

  • High 7.5

    Windows Routing and Remote Access Service (RRAS) Remote Code Execution Vulnerability

    Heap-based buffer overflow in Windows Routing and Remote Access Service (RRAS) allows an unauthorized attacker to execute code over a network.

  • High 7.8

    Windows Media Remote Code Execution Vulnerability

    Heap-based buffer overflow in Windows Media allows an authorized attacker to execute code locally.

  • High 8.5

    libvips has a potential heap-based buffer overflow when attempting to convert multiband TIFF input to HEIF output

    libvips is a demand-driven, horizontally threaded image processing library. The heifsave operation could incorrectly determine the presence of an alpha channel in an input when it was not possible to determine the colour interpretation, known internally withi…

  • Medium 5.3

    Open Asset Import Library Assimp ASE File ASEParser.cpp ParseLV4MeshBonesVertices heap-based overflow

    A vulnerability, which was classified as critical, was found in Open Asset Import Library Assimp 5.4.3. This affects the function Assimp::ASE::Parser::ParseLV4MeshBonesVertices of the file code/AssetLib/ASE/ASEParser.cpp of the component ASE File Handler. The…

  • Medium 5.3

    Open Asset Import Library Assimp LWO File LWOAnimation.cpp UpdateAnimRangeSetup heap-based overflow

    A vulnerability, which was classified as critical, has been found in Open Asset Import Library Assimp 5.4.3. Affected by this issue is the function Assimp::LWO::AnimResolver::UpdateAnimRangeSetup of the file code/AssetLib/LWO/LWOAnimation.cpp of the component…

  • High 7.3

    A heap buffer overflow vulnerability has been identified in the lcms2-2.16. The vulnerability exists in the UnrollChunk…

  • High 7.5

    A heap buffer overflow vulnerability has been identified in thesmooth2() in cmsgamma.c in lcms2-2.16 which allows a rem…

  • Low 3.3

    HDF5 H5HLcache.c H5HL__fl_deserialize heap-based overflow

    A vulnerability, which was classified as problematic, was found in HDF5 up to 1.14.6. This affects the function H5HL__fl_deserialize of the file src/H5HLcache.c. The manipulation of the argument free_block leads to heap-based buffer overflow. It is possible t…

  • Low 3.3

    HDF5 H5Fint.c H5F_addr_encode_len heap-based overflow

    A vulnerability, which was classified as problematic, has been found in HDF5 up to 1.14.6. Affected by this issue is the function H5F_addr_encode_len of the file src/H5Fint.c. The manipulation of the argument pp leads to heap-based buffer overflow. Attacking …

  • Medium 6.6

    fig2dev heap-buffer overflow

    heap-buffer overflow in fig2dev in version 3.2.9a allows an attacker to availability via local input manipulation via  create_line_with_spline.

  • Low 3.3

    HDF5 H5Faccum.c H5F__accum_free heap-based overflow

    A vulnerability classified as problematic was found in HDF5 up to 1.14.6. This vulnerability affects the function H5F__accum_free of the file src/H5Faccum.c. The manipulation of the argument overlap_size leads to heap-based buffer overflow. Attacking locally …

  • Low 3.3

    HDF5 H5FScache.c H5FS__sinfo_Srialize_Sct_cb heap-based overflow

    A vulnerability classified as problematic has been found in HDF5 up to 1.14.6. This affects the function H5FS__sinfo_Srialize_Sct_cb of the file src/H5FScache.c. The manipulation of the argument sect leads to heap-based buffer overflow. Local access is requir…

  • Low 3.3

    HDF5 H5Omessage.c H5O_msg_flush heap-based overflow

    A vulnerability was found in HDF5 up to 1.14.6. It has been declared as problematic. Affected by this vulnerability is the function H5O_msg_flush of the file src/H5Omessage.c. The manipulation of the argument oh leads to heap-based buffer overflow. The attack…

  • Low 3.3

    UPX p_lx_elf.cpp un_DT_INIT heap-based overflow

    A vulnerability, which was classified as problematic, was found in UPX up to 5.0.0. Affected is the function PackLinuxElf64::un_DT_INIT of the file src/p_lx_elf.cpp. The manipulation leads to heap-based buffer overflow. It is possible to launch the attack on …

  • Critical 9.4
    CVE-2025-30216 Public exploit

    CryptoLib Has Heap Overflow in Crypto_TM_ProcessSecurity due to Unchecked Secondary Header Length

    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. In versions 1.3.3 and prior,…

  • High 7.8

    Luxion KeyShot DAE File Parsing Heap-based Buffer Overflow Remote Code Execution Vulnerability

    Luxion KeyShot DAE File Parsing Heap-based Buffer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of Luxion KeyShot. User interaction is required to exploit this vuln…

  • Medium 6.3

    Open Asset Import Library Assimp MD5 File MD5Parser.cpp AI_MD5_PARSE_STRING_IN_QUOTATION heap-based overflow

    A vulnerability classified as critical was found in Open Asset Import Library Assimp 5.4.3. This vulnerability affects the function AI_MD5_PARSE_STRING_IN_QUOTATION of the file code/AssetLib/MD5/MD5Parser.cpp of the component MD5 File Handler. The manipulatio…

  • Medium 6.3

    Open Asset Import Library Assimp AC3D File ACLoader.cpp ConvertObjectSection heap-based overflow

    A vulnerability classified as critical has been found in Open Asset Import Library Assimp 5.4.3. This affects the function Assimp::AC3DImporter::ConvertObjectSection of the file code/AssetLib/AC/ACLoader.cpp of the component AC3D File Handler. The manipulatio…

  • Medium 6.3

    Open Asset Import Library Assimp AC3D File ACLoader.cpp ConvertObjectSection heap-based overflow

    A vulnerability was found in Open Asset Import Library Assimp 5.4.3. It has been declared as critical. Affected by this vulnerability is the function Assimp::AC3DImporter::ConvertObjectSection of the file code/AssetLib/AC/ACLoader.cpp of the component AC3D Fi…

  • Critical 9.8

    D-Link DAP-1620 Path api set_ws_action heap-based overflow

    A vulnerability, which was classified as critical, has been found in D-Link DAP-1620 1.03. Affected by this issue is the function set_ws_action of the file /dws/api/ of the component Path Handler. The manipulation leads to heap-based buffer overflow. The atta…

  • Medium 6.3

    Open Asset Import Library Assimp CSMLoader.cpp InternReadFile heap-based overflow

    A vulnerability, which was classified as critical, has been found in Open Asset Import Library Assimp 5.4.3. This issue affects the function CSMImporter::InternReadFile of the file code/AssetLib/CSM/CSMLoader.cpp. The manipulation leads to heap-based buffer o…

  • Medium 5.0

    WebAssembly wabt binary-reader-interp.cc GetReturnCallDropKeepCount heap-based overflow

    A vulnerability was found in WebAssembly wabt 1.0.36. It has been declared as critical. This vulnerability affects the function BinaryReaderInterp::GetReturnCallDropKeepCount of the file wabt/src/interp/binary-reader-interp.cc. The manipulation leads to heap-…

  • High 8.4

    MongoDB C Driver bson library may be susceptible to buffer overflow

    The various bson_append functions in the MongoDB C driver library may be susceptible to buffer overflow when performing operations that could result in a final BSON document which exceeds the maximum allowable size (INT32_MAX), resulting in a segmentation fau…

  • High 8.9

    CryptoLib Has Heap Buffer Overflow Due to Unsigned Integer Underflow in Crypto_TC_ProcessSecurity

    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. In versions 1.3.3 and prior,…

  • High 8.9

    CryptoLib Has Heap Buffer Overflow in Crypto_AOS_ProcessSecurity Function

    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. A critical heap buffer overf…

  • Medium 6.3

    WebAssembly wabt Malformed File binary-reader-interp.cc OnExport heap-based overflow

    A vulnerability was found in WebAssembly wabt 1.0.36 and classified as critical. This issue affects the function wabt::interp::(anonymous namespace)::BinaryReaderInterp::OnExport of the file wabt/src/interp/binary-reader-interp.cc of the component Malformed F…

  • Medium 6.3

    tbeu matio io.c strdup_vprintf heap-based overflow

    A vulnerability, which was classified as critical, was found in tbeu matio 1.5.28. Affected is the function strdup_vprintf of the file src/io.c. The manipulation leads to heap-based buffer overflow. It is possible to launch the attack remotely. The exploit ha…

  • Medium 6.3

    tbeu matio mat.c Mat_VarPrint heap-based overflow

    A vulnerability, which was classified as critical, has been found in tbeu matio 1.5.28. This issue affects the function Mat_VarPrint of the file src/mat.c. The manipulation leads to heap-based buffer overflow. The attack may be initiated remotely. The exploit…

  • Medium 5.3

    HDF5 Metadata Attribute Decoder H5MM_strndup heap-based overflow

    A vulnerability was found in HDF5 1.14.6 and classified as critical. This issue affects the function H5MM_strndup of the component Metadata Attribute Decoder. The manipulation leads to heap-based buffer overflow. Attacking locally is a requirement. The exploi…

  • Medium 5.3

    HDF5 Type Conversion Logic H5T__bit_copy heap-based overflow

    A vulnerability has been found in HDF5 1.14.6 and classified as critical. This vulnerability affects the function H5T__bit_copy of the component Type Conversion Logic. The manipulation leads to heap-based buffer overflow. Local access is required to approach …