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 5.5

    Buffer overflow in OpenVPN ovpn-dco-win version 1.3.0 and earlier and version 2.5.8 and earlier allows a local user pro…

  • Medium 5.3

    HDF5 H5FSsection.c H5FS__sect_find_node heap-based overflow

    A vulnerability, which was classified as critical, has been found in HDF5 up to 1.14.6. Affected by this issue is the function H5FS__sect_find_node of the file H5FSsection.c. The manipulation leads to heap-based buffer overflow. It is possible to launch the a…

  • Medium 5.3

    HDF5 H5Cimage.c H5C__reconstruct_cache_entry heap-based overflow

    A vulnerability classified as critical was found in HDF5 up to 1.14.6. Affected by this vulnerability is the function H5C__reconstruct_cache_entry of the file H5Cimage.c. The manipulation leads to heap-based buffer overflow. Attacking locally is a requirement…

  • Medium 5.3

    Open Asset Import Library Assimp HL1MDLLoader.cpp read_meshes heap-based overflow

    A vulnerability classified as critical was found in Open Asset Import Library Assimp up to 5.4.3. Affected by this vulnerability is the function read_meshes in the library assimp/code/AssetLib/MDL/HalfLife/HL1MDLLoader.cpp. The manipulation leads to heap-base…

  • Medium 6.6
    CVE-2025-5915 Public exploit

    Libarchive: heap buffer over read in copy_from_lzss_window() at archive_read_support_format_rar.c

    A vulnerability has been identified in the libarchive library. This flaw can lead to a heap buffer over-read due to the size of a filter block potentially exceeding the Lempel-Ziv-Storer-Schieber (LZSS) window. This means the library may attempt to read beyon…

  • Medium 5.3

    QTS, QuTS hero

    A buffer overflow vulnerability has been reported to affect several QNAP operating system versions. If exploited, the vulnerability could allow remote attackers who have gained user access to modify memory or crash processes. We have already fixed the vulnera…

  • Medium 5.5

    Buffer overflow vulnerability in the DFile module Impact: Successful exploitation of this vulnerability may affect avai…

  • Medium 5.3

    FCGI versions 0.44 through 0.82, for Perl, include a vulnerable version of the FastCGI fcgi2 (aka fcgi) library

    FCGI versions 0.44 through 0.82, for Perl, include a vulnerable version of the FastCGI fcgi2 (aka fcgi) library. The included FastCGI library is affected by CVE-2025-23016, causing an integer overflow (and resultant heap-based buffer overflow) via crafted nam…

  • Medium 6.0

    Apache ORC: Potential Heap Buffer Overflow during C++ LZO Decompression

    Heap-based Buffer Overflow vulnerability in Apache ORC. A vulnerability has been identified in the ORC C++ LZO decompression logic, where specially crafted malformed ORC files can cause the decompressor to allocate a 250-byte buffer but then attempts to copy …

  • Medium 4.5

    libpspp-core.a in GNU PSPP through 2.0.1 allows attackers to cause a heap-based buffer overflow in inflate_read (called…

  • Medium 4.5

    libpspp-core.a in GNU PSPP through 2.0.1 allows attackers to cause a heap-based buffer overflow in inflate_read (called…

  • Medium 6.9

    Heap-based Buffer Overflow vulnerability in RTI Connext Professional (Core Libraries) allows Overflow Variables and Tags.

    Heap-based Buffer Overflow vulnerability in RTI Connext Professional (Core Libraries) allows Overflow Variables and Tags. This issue affects Connext Professional: from 7.4.0 before 7.5.0, from 7.0.0 before 7.3.0.7, from 6.1.0 before 6.1.2.23, from 6.0.0 befor…

  • Medium 5.5

    Gnuplot: gnuplot heap-buffer overflow on utf8_copy_one

    gnuplot is affected by a heap buffer overflow at function utf8_copy_one.

  • Medium 4.8

    An Heap-based Buffer Overflow in RT-Labs P-Net version 1.0.1 or earlier allows an attacker to corrupt the memory of IO …

  • Medium 5.3

    symisc UnQLite unqlite.c jx9MemObjStore heap-based overflow

    A vulnerability classified as critical was found in symisc UnQLite up to 957c377cb691a4f617db9aba5cc46d90425071e2. This vulnerability affects the function jx9MemObjStore of the file /data/src/benchmarks/unqlite/unqlite.c. The manipulation leads to heap-based …

  • Medium 6.9

    An integer overflow can be triggered in SQLite’s `concat_ws()` function. The resulting, truncated integer is then used …

  • Medium 5.3

    Open Asset Import Library Assimp File MD3Loader.cpp ValidateSurfaceHeaderOffsets heap-based overflow

    A vulnerability, which was classified as critical, was found in Open Asset Import Library Assimp 5.4.3. Affected is the function Assimp::MD3Importer::ValidateSurfaceHeaderOffsets of the file code/AssetLib/MD3/MD3Loader.cpp of the component File Handler. The m…

  • Medium 5.3

    Open Asset Import Library Assimp File types.h Set heap-based overflow

    A vulnerability, which was classified as critical, has been found in Open Asset Import Library Assimp up to 5.4.3. This issue affects the function aiString::Set in the library include/assimp/types.h of the component File Handler. The manipulation leads to hea…

  • Medium 4.8

    Buffer overflow in QTextMarkdownImporter

    There is a Heap-based Buffer Overflow vulnerability in QTextMarkdownImporter. This requires an incorrectly formatted markdown file to be passed to QTextMarkdownImporter to trigger the overflow. This issue affects Qt from 6.8.0 to 6.8.4. Versions up to 6.6.0 a…

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

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

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

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

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

  • Medium 5.3

    HDF5 Scale-Offset Filter H5Z__scaleoffset_decompress_one_byte heap-based overflow

    A vulnerability, which was classified as critical, was found in HDF5 1.14.6. This affects the function H5Z__scaleoffset_decompress_one_byte of the component Scale-Offset Filter. The manipulation leads to heap-based buffer overflow. An attack has to be approac…

  • Medium 5.0

    HDF5 h5 File H5SM.c H5SM_delete heap-based overflow

    A vulnerability, which was classified as critical, was found in HDF5 1.14.6. Affected is the function H5SM_delete of the file H5SM.c of the component h5 File Handler. The manipulation leads to heap-based buffer overflow. It is possible to launch the attack re…

  • Medium 6.3

    Open Asset Import Library Assimp File BaseImporter.cpp ConvertToUTF8 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 Assimp::BaseImporter::ConvertToUTF8 of the file BaseImporter.cpp of the component File Handler. The manipulation leads…

  • Medium 5.3

    rizinorg rizin utf8.c rz_utf8_encode heap-based overflow

    A vulnerability, which was classified as critical, was found in rizinorg rizin up to 0.8.0. This affects the function rz_utf8_encode in the library /librz/util/utf8.c. The manipulation leads to heap-based buffer overflow. An attack has to be approached locall…

  • Medium 4.3

    Zoom Workplace Apps and SDKs - Buffer Overflow

    Buffer overflow in some Zoom Workplace Apps and SDKs may allow an authenticated user to conduct a denial of service via network access.

  • Medium 5.1

    Heap Overflow in iniparser.c

    Heap-based Buffer Overflow vulnerability in iniparser_dumpsection_ini() in iniparser allows attacker to read out of bound memory

  • Medium 5.3

    A heap buffer overflow vulnerability in FFmpeg before commit 4bf784c allows attackers to trigger a memory corruption vi…

  • Medium 5.5

    A Structured Exception Handler based buffer overflow vulnerability exists in Effectmatrix Total Video Converter Command…