CVE-2026-58381 Gimp: gimp: double-free in read_layer_block()
A double-free vulnerability in GIMP's PSP parser allows attackers to cause memory corruption, leading to denial of service or arbitrary code execution.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-58381?
CVE-2026-58381 is a medium-severity use after free vulnerability in Gimp Gimp, published on 2 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-415
Which versions are affected by CVE-2026-58381?
It affects 2 products.
Products include Gimp Gimp, Redhat Enterprise Linux.
How do I fix CVE-2026-58381?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2026-58381 being exploited?
There is no known exploitation of CVE-2026-58381 in the wild and no public exploit code.
Other vulnerabilities in Gimp Gimp
Sources
Also known as CLSA-2026-1791295129, CLSA-2026-1791296305, DEBIAN-CVE-2026-58381, GHSA-pfjw-r4vx-pmfw, OESA-2026-2880, OESA-2026-2882 and 1 more.