Bug 2496166 (CVE-2026-58381)

Summary: CVE-2026-58381 gimp: gimp: Double-free in read_layer_block()
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: rhel-process-autobot, watson-tool-maintainers
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-07-01 20:22:45 UTC
A double-free vulnerability exists in GIMP's Paint Shop Pro (PSP) file format parser. In read_layer_block() in file-psp.c, the variable name is allocated, used, and freed each loop iteration. On the error path in the 2nd iteration, fread fails before g_malloc for name, so the stale pointer from iteration 1 is freed again via g_free(name).

- Function: read_layer_block()
- File: plug-ins/common/file-psp.c:1908-2321
- Fix: https://gitlab.gnome.org/GNOME/gimp/-/commit/b22e147b
- Upstream issue: https://gitlab.gnome.org/GNOME/gimp/-/issues/16207
- Acknowledgment: bb1abu