MEDIUM 6.1

CVE-2026-58381: GIMP PSP Parser Double-Free Vulnerability

GIMP, a widely used open-source image editor, contains a memory safety bug in its PSP (PaintShop Pro) file parser. When GIMP opens a specially crafted PSP file, a programming error causes the application to attempt to free the same memory block twice—a condition known as a double-free. This can corrupt the application's memory state, crash the program, or in some cases allow an attacker to execute arbitrary code on the system. The vulnerability requires local file access and user interaction (opening the malicious file), limiting but not eliminating real-world risk.

Source data · NVD / CISA · public domain

CVSS
3.1 · 6.1 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:H
Weaknesses (CWE)
CWE-415
Affected products
0 configuration(s)
Published / Modified
2026-07-02 / 2026-07-07

NVD description (verbatim)

A flaw was found in GIMP's PSP file format parser. A double-free condition occurs in the read_layer_block() function when processing a specially crafted PSP file. This could allow an attacker to cause memory corruption, potentially leading to denial of service or arbitrary code execution.

4 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-58381 is a double-free vulnerability (CWE-415) in GIMP's read_layer_block() function within the PSP file format parser. The flaw occurs during the processing of layer data in a crafted PSP image file. When memory is deallocated twice in sequence without proper state management, heap metadata corruption results. Depending on memory allocator behavior and heap layout, this can lead to denial of service through application crash or, under certain conditions, heap exploitation for code execution. The vulnerability affects GIMP on systems where users may open untrusted PSP files.

Business impact

For organizations using GIMP in image processing workflows—whether for design, batch automation, or collaborative content creation—this vulnerability introduces risk of work interruption through application crashes. If the vulnerability is exploited for code execution, an attacker gains the privileges of the user running GIMP, potentially enabling lateral movement or data exfiltration from the affected workstation. In environments where GIMP processes user-submitted or third-party image files (web design agencies, media companies, automated design services), the attack surface widens. The vulnerability does not propagate across a network without user interaction, limiting enterprise-wide blast radius.

Affected systems

GIMP installations on all platforms (Linux, Windows, macOS) that process PSP files are affected. The vulnerability is present in the application's core file format support and is independent of operating system. End users and organizations relying on GIMP for image manipulation are in scope, as are automated systems that ingest PSP files without additional validation or sandboxing. Users who exclusively work with other image formats (JPEG, PNG, GIF) are not exposed. Patch status and affected version ranges should be verified against the official GIMP project advisories.

Exploitability

Exploiting this vulnerability requires an attacker to craft a malicious PSP file and deliver it to a user, who must then open it in GIMP. The file format manipulation is complex but not unprecedented; proof-of-concept development would be feasible for skilled attackers familiar with heap exploitation or binary format reverse engineering. The local-file, user-interaction requirement (AV:L, UI:R in the CVSS vector) means this is not a wormable or remotely triggerable flaw. However, social engineering, watering-hole attacks on design asset repositories, or supply-chain compromise of template files could serve as delivery vectors. The double-free primitive is a known exploitation technique, so reliable weaponization is plausible for motivated threat actors.

Remediation

The primary remediation is to apply a patched version of GIMP that resolves the double-free condition in read_layer_block(). Verify the specific patch version against the official GIMP project security advisory. Interim mitigations include: avoiding opening untrusted or suspicious PSP files; disabling or restricting PSP format support if not required; sandboxing GIMP or using containerization to limit the scope of code execution; and enforcing file validation policies in automated workflows. Users should also be trained to avoid opening PSP files from unknown sources.

Patch guidance

Consult the GIMP project's official security advisory and release notes for the specific patched version that addresses CVE-2026-58381. The patch resolves the double-free condition in the PSP parser's layer block reading routine. After updating GIMP, verify the new version is active by checking Help > About or the command-line version output. Automated deployment and testing should focus on PSP file handling to confirm the vulnerability is resolved before returning to production workflows. No special configuration changes are required post-patch.

Detection guidance

Intrusion detection can be difficult because the vulnerability is triggered by local file processing, not network activity. However, organizations can: (1) Monitor for GIMP crashes or abnormal termination events, especially if correlated with file access patterns involving PSP files; (2) Track GIMP version inventory to identify outdated installations; (3) Log and alert on attempts to open PSP files from untrusted locations (downloads folder, email attachments, external shares); (4) Use file integrity monitoring on design asset repositories to detect placement of suspicious PSP files; (5) Employ sandboxed or containerized GIMP instances to isolate exploitation attempts and generate telemetry. Endpoint detection and response (EDR) tools may flag suspicious heap manipulation or post-crash memory dumps showing corruption patterns.

Why prioritize this

This vulnerability merits timely attention because it affects a widely used open-source tool with an active user base in creative and design sectors. The double-free condition is a well-understood exploitation primitive with potential for reliable code execution, elevating risk beyond simple denial of service. Although the attack requires local file delivery and user action, the barrier is modest in supply-chain or watering-hole scenarios. The CVSS score of 6.1 (Medium) reflects the local/user-interaction constraints, but actual risk depends on organizational exposure: teams processing third-party PSP files or those with limited security awareness should prioritize patching. The lack of KEV listing suggests no active in-the-wild exploitation at the time of publication, but this does not guarantee future immunity.

Risk score, explained

The CVSS 3.1 score of 6.1 (Medium severity) is derived from: Attack Vector: Local (AV:L)—the attacker must supply a file to the user; Attack Complexity: Low (AC:L)—crafting a malicious PSP file is straightforward once the vulnerability is understood; Privileges Required: Low (PR:L)—the user running GIMP needs basic system privileges, which most end users have; User Interaction: Required (UI:R)—the user must open the file in GIMP; Scope: Unchanged (S:U)—the impact is limited to the GIMP process and user's local system; Confidentiality Impact: Low (C:L)—potential data leakage from the process; Integrity Impact: Low (I:L)—potential modification of data; Availability Impact: High (A:H)—the double-free reliably crashes GIMP or enables code execution. The score reflects that real-world exploitation requires social engineering or supply-chain compromise, tempering the severity rating despite the serious nature of double-free flaws.

Frequently asked questions

Can this vulnerability spread across a network without user action?

No. The vulnerability requires a user to open a malicious PSP file in GIMP. It does not propagate through network services, email protocols, or shared file systems automatically. However, it can be weaponized via email attachments, compromised file repositories, or malicious websites offering design templates.

Does this affect users who don't open PSP files?

No. Users who work exclusively with PNG, JPEG, GIF, or other image formats are not exposed to this particular vulnerability. However, GIMP users should be aware of this flaw and keep their software updated, as PSP is a legitimate format sometimes encountered in design workflows.

Is a patch available, and how do I verify the fix?

Patch availability depends on the GIMP version and release timeline. Check the official GIMP website and security advisories for the patched version. After updating, verify the new version number in GIMP (Help > About) and test by attempting to open a benign PSP file to confirm normal operation. Always update from official sources.

What should I do if I've already opened a suspicious PSP file?

If your GIMP crashed, restart your system as a precaution. If GIMP is still running normally, monitor your system for suspicious activity (unexpected processes, network connections, file modifications). Consider running a full antivirus scan and updating GIMP immediately. In a corporate environment, report the incident to your security team for investigation.

This analysis is provided for informational purposes and reflects the state of CVE-2026-58381 as of the publication date. The vulnerability details, affected versions, and patch status should be verified against official advisories from the GIMP project. SEC.co does not provide legal, compliance, or technical support; consult your organization's security team or vendor for guidance specific to your environment. Exploit code or weaponized proof-of-concepts are not discussed herein. Always validate patches in a test environment before production deployment. Information in this analysis may be updated as new details emerge. Source: NVD (public-domain), retrieved 2026-08-11. Analysis generated by SEC.co (claude-haiku-4-5).