CVE-2026-137941: Gimp: gimp: heap out-of-bounds write via unvalidated levels channel property
A flaw was found in GIMP. The Levels configuration setter does not validate the channel enum before using it to index fixed-size per-channel arrays. A crafted XCF file with a non-destructive Levels filter can set an out-of-range channel (LUMINANCE or RGB), causing a heap out-of-bounds read and write when the file is opened. This may lead to a crash or arbitrary code execution.
Affected Software
Event History
Frequently Asked Questions
What must an attacker do to trigger this issue?
An attacker must convince a user to open a crafted XCF file containing a non-destructive Levels filter. The file sets the Levels channel property to an out-of-range value such as LUMINANCE or RGB.
Who is exposed to this vulnerability?
GIMP users who open untrusted or attacker-supplied XCF files are exposed. Exploitation requires local handling of the malicious file and user interaction to open it.
What can happen when a malicious file is opened?
Opening the crafted XCF can cause heap out-of-bounds reads and writes. This may crash GIMP or potentially allow arbitrary code execution with the privileges of the user running GIMP.