CVE-2026-78465 in GIMPinfo

Summary

by MITRE • 08/24/2026

A flaw was found in the file-pcx plugin in GIMP, affecting 32-bit builds only. When processing a PCX image file, the plugin calculates memory allocation sizes based on the image dimensions and the number of color planes. If a crafted file sets the number of planes to 4 alongside sufficiently large dimensions, the calculation exceeds the 32-bit integer limit and overflows, resulting in an undersized heap-based buffer allocation. This integer overflow issue results in a heap-based buffer overflow when the plugin subsequently writes image data into the undersized buffer, causing memory corruption, potentially leading to arbitrary code execution or a denial of service.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 08/24/2026

The vulnerability identified within the file-pcx plugin for GIMP represents a critical security flaw specific to 32-bit application builds. This issue stems from an integer overflow condition that occurs during the processing of PCX image files, which are legacy graphics formats still encountered in various digital workflows. The root cause lies in how the plugin calculates memory allocation sizes based on input parameters derived from the file header, specifically the image dimensions and the number of color planes. In a 32-bit environment, integer variables have a maximum value limit defined by their bit width. When an attacker crafts a malicious PCX file that specifies four color planes alongside sufficiently large height and width values, the mathematical operation used to determine the required buffer size exceeds this 32-bit integer boundary. Instead of failing gracefully or allocating sufficient memory, the calculation wraps around due to overflow, resulting in a significantly smaller allocated heap buffer than what is actually needed to store the image data.

This miscalculation leads directly to a heap-based buffer overflow when the plugin proceeds to write the pixel data into the undersized allocation. Because the allocated space is insufficient for the volume of incoming data from the crafted file, subsequent writes overwrite adjacent memory regions on the heap. This memory corruption can destabilize the application's internal state structures or metadata stored nearby in memory. The operational impact of this flaw is severe, as it provides a potential attack vector for arbitrary code execution. By carefully crafting the overflow payload and controlling the contents of the overwritten memory, an attacker could potentially execute malicious instructions within the context of the user running GIMP. Alternatively, if the overwrite corrupts critical control flow data or causes immediate instability, the result is a denial of service through application crash.

From a classification perspective, this vulnerability aligns with CWE-190, which describes Integer Overflow or Wraparound, and specifically manifests as CWE-122, Heap-based Buffer Overflow. The exploitation technique involves manipulating file parsing logic to trigger memory corruption, mapping closely to ATT&CK techniques related to initial access via malicious files and subsequent execution through local privilege escalation or process injection if the application runs with elevated privileges. While GIMP is primarily a desktop graphics editor, its widespread use in professional environments means that automated processing of untrusted image assets could expose systems to this risk.

Mitigation strategies should focus on both immediate remediation and long-term architectural improvements. The primary fix involves updating the file-pcx plugin code to perform safe integer arithmetic checks before allocating memory. Developers must verify that the calculated size does not exceed the maximum value for a 32-bit signed or unsigned integer, depending on the implementation, and reject files with dimensions or plane counts that would cause an overflow. Additionally, implementing bounds checking during the data write phase can provide defense-in-depth against buffer overflows even if allocation errors occur. For users unable to immediately update their software, restricting the use of GIMP to process only trusted PCX files reduces exposure. Upgrading to 64-bit builds of GIMP where available may also mitigate this specific integer overflow issue due to the larger address space and wider integer types, although code-level fixes remain essential for comprehensive security posture.

Responsible

Redhat

Reservation

08/24/2026

Disclosure

08/24/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Want to know what is going to be exploited?

We predict KEV entries!