CVE-2026-58381: Gimp: gimp: double-free in read_layer_block()

Published Jul 1, 2026
·
Updated

A double-free vulnerability exists in GIMP's Paint Shop Pro (PSP) file format parser. In readlayerblock() 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 gmalloc for name, so the stale pointer from iteration 1 is freed again via gfree(name).

- Function: readlayerblock() - 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

Other sources

A flaw was found in GIMP's PSP file format parser. A double-free condition occurs in the readlayerblock() 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.

MITRE

Affected Software

6 affected components
GIMP/GNOME GIMP
GIMP GIMP<=3.2.1
redhat Enterprise Linux=6.0
redhat Enterprise Linux=7.0
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade GIMP to a version that resolves this vulnerability.

    Patch b22e147b

Event History

Jul 1, 2026
Data Sourced
via Red Hat·08:22 PM
DescriptionSeverityAffected Software
Jul 2, 2026
CVE Published
via MITRE·07:45 PM
Data Sourced
via MITRE·07:45 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
RemedyDescriptionSeverityWeaknessAffected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203