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 4.8

    Heap Buffer Overflow in vifm

    vifm is vulnerable to a heap buffer overflow during the history merge process when saving the state file (vifminfo.json). This flaw occurs because the application lacks a runtime check on the length of history entries in release builds, potentially allowing a…

  • Medium 5.5

    Heap overflow in FUSE_LISTXATTR

    When a fusefs file system implements extended attributes, the kernel may send a FUSE_LISTXATTR message to the userspace daemon to retrieve the list of extended attributes for a given file. The FUSE protocol requires the daemon to return a packed list of NUL-t…

  • Medium 6.5

    Libsolv: heap buffer overflow in libsolv repo_add_solv via negative maxsize from crafted .solv file

    A flaw was found in libsolv. This heap buffer overflow vulnerability occurs when a victim processes a specially crafted `.solv` file containing negative size values in the `repo_add_solv` function. This leads to an undersized memory allocation and a subsequen…

  • Medium 5.1

    rust-openssl: Heap buffer overflow when encrypting with AES key-wrap-with-padding

    rust-openssl provides OpenSSL bindings for the Rust programming language. From 0.10.0 to before 0.10.79, CipherCtxRef::cipher_update, CipherCtxRef::cipher_update_vec, and symm::Crypter::update incorrectly sized output buffers when used with AES key-wrap-with-…

  • Medium 4.3

    Heap buffer overflow in SwiftShader in Google Chrome on Mac and iOS prior to 148.0.7778.168 allowed a remote attacker t…

  • Medium 4.3

    Heap buffer overflow in GPU in Google Chrome on Android prior to 148.0.7778.168 allowed a remote attacker to perform an…

  • Medium 6.6
    CVE-2026-0264 Public exploit

    PAN-OS: Heap-Based Buffer Overflow in DNS Proxy and DNS Server Allows Unauthenticated Remote Code Execution

    A buffer overflow vulnerability in the DNS proxy and DNS Server features of Palo Alto Networks PAN-OS® Software allows an unauthenticated attacker with network access to cause a denial of service (DoS) condition (all PAN-OS platforms except Cloud NGFW and Pri…

  • Medium 6.2

    Windows Volume Manager Extension Driver Remote Code Execution Vulnerability

    Heap-based buffer overflow in Volume Manager Extension Driver allows an authorized attacker to execute code with a physical attack.

  • Medium 5.9

    Squirrel sqobject.cpp Load heap-based overflow

    A vulnerability was determined in Squirrel up to 3.2. This affects the function SQFunctionProto::Load of the file squirrel/sqobject.cpp. This manipulation causes heap-based buffer overflow. The attack is restricted to local execution. The exploit has been pub…

  • Medium 5.3

    OSGeo gdal Grid File GDapi.c GDSDfldsrch heap-based overflow

    A vulnerability has been found in OSGeo gdal up to 3.13.0dev-4. Affected by this issue is the function GDSDfldsrch of the file frmts/hdf4/hdf-eos/GDapi.c of the component Grid File Handler. The manipulation leads to heap-based buffer overflow. An attack has t…

  • Medium 5.3

    OSGeo gdal SWapi.c SWSDfldsrch heap-based overflow

    A flaw has been found in OSGeo gdal up to 3.13.0dev-4. Affected by this vulnerability is the function SWSDfldsrch of the file frmts/hdf4/hdf-eos/SWapi.c. Executing a manipulation can lead to heap-based buffer overflow. The attack requires local access. The ex…

  • Medium 5.1

    Pillow: Heap buffer overflow with nested list coordinates

    Pillow is a Python imaging library. From version 11.2.1 to before version 12.2.0, passing nested lists as coordinates to APIs that accept coordinates such as ImagePath.Path, ImageDraw.ImageDraw.polygon and ImageDraw.ImageDraw.line could cause a heap buffer ov…

  • Medium 6.6

    Vim: Heap Buffer Overflow in spell file loading

    Vim is an open source, command line text editor. Prior to version 9.2.0450, a heap buffer overflow exists in read_compound() in src/spellfile.c when loading a crafted spell file (.spl) with UTF-8 encoding active. An attacker-controlled length field in the spe…

  • Medium 6.9

    Integer underflow in crypto_sign_open() leads to buffer overflow

    CROSS implementation contains reference and optimized implementations of the CROSS post-quantum signature algorithm. Prior to commit fc6b7e7, there is a buffer overflow in crypto_sign_open() caused by an underflow of the integer mlen. This issue has been patc…

  • Medium 5.3

    OSGeo gdal GDapi.c GDnentries heap-based overflow

    A security flaw has been discovered in OSGeo gdal up to 3.13.0dev-4. Impacted is the function GDnentries of the file frmts/hdf4/hdf-eos/GDapi.c. Performing a manipulation of the argument DataFieldName results in heap-based buffer overflow. The attack must be …

  • Medium 5.3

    OSGeo gdal SWapi.c SWnentries heap-based overflow

    A vulnerability was identified in OSGeo gdal up to 3.13.0dev-4. This issue affects the function SWnentries of the file frmts/hdf4/hdf-eos/SWapi.c. Such manipulation of the argument DimensionName leads to heap-based buffer overflow. The attack must be carried …

  • Medium 5.5

    Buffer Overflow vulnerability in GPAC before commit v391dc7f4d234988ea0bc3cc294eb725eddf8f702 allows an attacker to cau…

  • Medium 5.5

    A heap-based out-of-bounds read vulnerability in RWObj_Reader::read in the OBJ file parser in Open CASCADE Technology (…

  • Medium 5.5

    Heap-based Buffer Overflow in Wireshark

    DCP-ETSI protocol dissector crash in Wireshark 4.6.0 to 4.6.4 and 4.4.0 to 4.4.14 allows denial of service

  • Medium 5.5

    Heap-based Buffer Overflow in Wireshark

    DCP-ETSI protocol dissector crash in Wireshark 4.6.0 to 4.6.4 and 4.4.0 to 4.4.14 allows denial of service

  • Medium 5.5

    Heap-based Buffer Overflow in Wireshark

    iLBC audio codec crash in Wireshark 4.6.0 to 4.6.4 and 4.4.0 to 4.4.14 allows denial of service

  • Medium 5.5

    Heap-based Buffer Overflow in Wireshark

    Crash in sharkd 4.6.0 to 4.6.4 and 4.4.0 to 4.4.14 allows denial of service

  • Medium 6.5

    Off-by-one access when processing crafted UDP responses

    A rogue backend can send a crafted UDP response with a query ID off by one related to the maximum configured value, triggering an out-of-bounds write leading to a denial of service.

  • Medium 5.3

    SD-330AC and AMC Manager provided by silex technology, Inc. contain a heap-based buffer overflow vulnerability in packe…

  • Medium 6.3

    xrdp: Heap buffer overflow in xrdp_sec_process_logon_info() via incorrect g_strncat length calculation

    xrdp is an open source RDP server. Versions through 0.10.5 contain a heap-based buffer overflow vulnerability in its logon processing. In environments where domain_user_separator is configured in xrdp.ini, an unauthenticated remote attacker can send a crafted…

  • Medium 5.3

    libvips nip2 vips7compat.c im_minpos_vec heap-based overflow

    A security vulnerability has been detected in libvips up to 8.18.2. The affected element is the function im_minpos_vec of the file libvips/deprecated/vips7compat.c of the component nip2 Handler. Such manipulation of the argument n leads to heap-based buffer o…

  • Medium 4.3

    Heap buffer overflow in Skia in Google Chrome prior to 147.0.7727.101 allowed a remote attacker to obtain potentially s…

  • Medium 5.5

    Adobe Framemaker | Heap-based Buffer Overflow (CWE-122)

    Adobe Framemaker versions 2022.8 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 …

  • Medium 6.8
    CVE-2026-32223 Public exploit

    Windows USB Printing Stack (usbprint.sys) Elevation of Privilege Vulnerability

    Heap-based buffer overflow in Windows USB Print Driver allows an unauthorized attacker to elevate privileges with a physical attack.

  • Medium 5.5

    InDesign Desktop | Heap-based Buffer Overflow (CWE-122)

    InDesign Desktop versions 20.5.2, 21.2 and earlier are affected by a Heap-based Buffer Overflow vulnerability that could lead to application denial-of-service. An attacker could exploit this vulnerability to crash the application or disrupt its functionality.…

  • Medium 5.5

    InDesign Desktop | Heap-based Buffer Overflow (CWE-122)

    InDesign Desktop versions 20.5.2, 21.2 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…

  • Medium 5.5

    ImageMagick: Heap out-of-bounds write in JP2 encoder

    ImageMagick is free and open-source software used for editing and manipulating digital images. Versions below both 7.1.2-19 and 6.9.13-44, contain a heap out-of-bounds write in the JP2 encoder with when a user specifies an invalid sampling index. This issue h…

  • Medium 5.5

    ImageMagick: Heap buffer overflow when encoding JXL image with a 16-bit float

    ImageMagick is free and open-source software used for editing and manipulating digital images. In versions below 7.1.2-19, the JXL encoder has an heap write overflow when a user specifies that the image should be encoded as 16 bit floats. This issue has been …

  • Medium 6.2

    ImageMagick: Heap buffer overflow (WRITE) in the YAML and JSON encoders

    ImageMagick is free and open-source software used for editing and manipulating digital images. In versions below 7.1.2-19, a crafted image could result in an out of bounds heap write when writing a yaml or json output, resulting in a crash. This issue has bee…

  • Medium 5.3

    ImageMagick: Heap BufferOverflow write of single zero byte when parsing XML

    ImageMagick is free and open-source software used for editing and manipulating digital images. In versions below 7.1.2-189 and 6.9.13-44, when `Magick` parses an XML file it is possible that a single zero byte is written out of the bounds. This issue has been…

  • Medium 5.5

    HDF5 H5T__ref_mem_setnull Heap Buffer Overflow

    HDF5 is software for managing data. In 1.14.1-2 and earlier, an attacker who can control an h5 file parsed by HDF5 can trigger a write-based heap buffer overflow condition in the H5T__ref_mem_setnull method. This can lead to a denial-of-service condition, and…

  • Medium 6.3

    Heap buffer overflow in CertFromX509() via AuthorityKeyIdentifier

    Heap buffer overflow in CertFromX509 via AuthorityKeyIdentifier size confusion. A heap buffer overflow occurs when converting an X.509 certificate internally due to incorrect size handling of the AuthorityKeyIdentifier extension.

  • Medium 4.3

    Heap buffer overflow in WebML in Google Chrome prior to 147.0.7727.55 allowed a remote attacker to obtain potentially s…

  • Medium 4.3

    Heap buffer overflow in WebML in Google Chrome prior to 147.0.7727.55 allowed a remote attacker to obtain potentially s…

  • Medium 4.3

    Heap buffer overflow in WebAudio in Google Chrome prior to 147.0.7727.55 allowed a remote attacker to obtain potentiall…