Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-78465

CVE-2026-78465: GIMP file-pcx Plugin Buffer Overflow

CVE-2026-78465 is a heap-based buffer overflow in GIMP's file-pcx plugin affecting 32-bit builds. Attackers can exploit crafted PCX files to cause memory corruption and potentially execute code. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

CVE-2026-78465 Overview

CVE-2026-78465 is an integer overflow vulnerability [CWE-190] in the file-pcx plugin of GNU Image Manipulation Program (GIMP), affecting 32-bit builds only. The plugin calculates heap allocation sizes from PCX image dimensions and the number of color planes. A crafted PCX file with 4 planes and large dimensions causes the arithmetic to exceed the 32-bit integer limit and wrap. GIMP then allocates an undersized heap buffer and writes attacker-controlled image data past its bounds. The resulting heap-based buffer overflow can corrupt memory, enabling arbitrary code execution or a denial of service.

Critical Impact

Opening a malicious PCX file on a 32-bit GIMP build can trigger heap memory corruption and potentially execute attacker-controlled code in the user's session.

Affected Products

  • GNU Image Manipulation Program (GIMP), 32-bit builds
  • file-pcx plugin distributed with affected GIMP builds
  • Downstream Linux distributions shipping 32-bit GIMP packages (see Red Hat advisory)

Discovery Timeline

  • 2026-08-24 - CVE-2026-78465 published to NVD
  • 2026-08-25 - Last updated in NVD database

Technical Details for CVE-2026-78465

Vulnerability Analysis

The flaw resides in the PCX file loader shipped with GIMP. The loader parses the PCX header to obtain the image width, height, and number of color planes, then computes the size of a heap buffer used to hold decoded pixel rows. When the number of planes is set to 4 and the width or height values are sufficiently large, the multiplication used to derive the allocation size overflows a 32-bit unsigned integer and wraps to a small value.

The allocator returns a buffer far smaller than the decoded image requires. As the plugin decodes run-length-encoded PCX scanlines, it writes past the end of this undersized allocation. The out-of-bounds writes corrupt adjacent heap metadata and application data. Depending on heap layout and glibc allocator state, this corruption can be steered toward arbitrary code execution, or it can crash the process for a denial of service.

Exploitation requires a user to open a malicious PCX file in a 32-bit GIMP build. The attack complexity is elevated because the attacker must control heap layout on the target and the issue does not affect 64-bit builds where the arithmetic does not overflow at the same input sizes.

Root Cause

The root cause is unchecked integer arithmetic during buffer size computation in the file-pcx plugin. The size formula multiplies attacker-controlled 16-bit header fields together with a plane count of 4, and the intermediate result is stored in a 32-bit type. No pre-multiplication bounds check or saturating arithmetic prevents the wrap. This is a textbook CWE-190 integer overflow that feeds directly into a heap allocation and subsequent write loop.

Attack Vector

Delivery is local: an attacker crafts a PCX file and induces a user to open it in GIMP, for example through a spear-phishing attachment, a shared design asset, or a bundled archive. No authentication is required on the target, but user interaction is required to open the file. The exploit surface is limited to 32-bit GIMP builds; 64-bit builds are not affected under the same conditions.

See the Red Hat CVE-2026-78465 Advisory, the Red Hat Bug 2522057 Report, and the upstream GNOME GIMP Work Item #16578 for technical detail. No verified proof-of-concept code has been published.

Detection Methods for CVE-2026-78465

Indicators of Compromise

  • Unexpected crashes of the gimp process shortly after a user opens a .pcx file, especially with SIGSEGV or glibc heap corruption messages in system logs.
  • PCX files with unusually large declared width or height values combined with a plane count of 4 in the file header.
  • Child processes spawned by gimp that do not match normal image-editing workflows, such as shells or network utilities.

Detection Strategies

  • Inspect PCX files at mail gateways and file shares by parsing the 128-byte header and flagging samples where NPlanes == 4 and width × height × planes approaches or exceeds the 32-bit boundary.
  • Enable glibc heap hardening diagnostics (MALLOC_CHECK_, GLIBC_TUNABLES) on analyst workstations to convert silent corruption into loud aborts that can be alerted on.
  • Correlate GIMP process crashes with recent file-open events in endpoint telemetry to identify targeted delivery attempts.

Monitoring Recommendations

  • Monitor endpoint telemetry for gimp or gimp-2.10 processes that terminate abnormally or spawn interpreters such as sh, bash, or python.
  • Track installation and use of 32-bit GIMP packages across the fleet; prioritize migration or patching on those hosts.
  • Alert on PCX files delivered via email or download that exceed reasonable size or dimension thresholds for the environment.

How to Mitigate CVE-2026-78465

Immediate Actions Required

  • Identify systems running 32-bit GIMP builds and prioritize them for patching or removal.
  • Apply vendor updates as soon as they are available from your Linux distribution or GIMP packager; monitor the Red Hat CVE-2026-78465 Advisory for fixed package versions.
  • Instruct users to avoid opening PCX files from untrusted sources until patches are deployed.

Patch Information

Upstream tracking is available at the GNOME GIMP Work Item #16578. Distribution-specific fixed versions are tracked in the Red Hat Bug 2522057 Report. Update to the fixed GIMP package for your platform once released, and rebuild any downstream images that embed GIMP.

Workarounds

  • Migrate affected users from 32-bit GIMP builds to 64-bit builds where the overflow condition does not trigger at the same input sizes.
  • Block or quarantine .pcx attachments at email and web gateways until the environment is patched.
  • Restrict GIMP execution on high-risk hosts using AppArmor, SELinux, or Flatpak sandbox profiles to limit the impact of successful memory corruption.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.