<Vulnerability name="CVE-2026-42170">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Important</ThreatSeverity>
    <PublicDate>2026-08-04T00:19:42</PublicDate>
    <Bugzilla id="2461726" url="https://bugzilla.redhat.com/show_bug.cgi?id=2461726" xml:lang="en:us">
gimp: GIMP DDS plug-in heap-based buffer overflow via BPP mismatch in load_layer() (ddsread.c)
    </Bugzilla>
    <CVSS3 status="draft">
        <CVSS3BaseScore>7.8</CVSS3BaseScore>
        <CVSS3ScoringVector>CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H</CVSS3ScoringVector>
    </CVSS3>
    <CWE>CWE-131</CWE>
    <Details xml:lang="en:us" source="Mitre">
A heap-based buffer overflow vulnerability exists in the GIMP DDS (DirectDraw Surface) file parser. When a crafted DDS file declares a D3D9 pixel format but sets a lower bits-per-pixel (bpp) value in the header, the loader allocates an undersized heap buffer. Subsequent pixel data consumption at the real format's stride causes a write past the heap buffer boundary, leading to heap metadata corruption and potential code execution.
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
A heap-based buffer overflow vulnerability exists in the GIMP DDS (DirectDraw Surface) file parser. When a crafted DDS file declares a D3D9 pixel format but sets a lower bits-per-pixel (bpp) value in the header, the loader allocates an undersized heap buffer. Subsequent pixel data consumption at the real format's stride causes a write past the heap buffer boundary, leading to heap metadata corruption and potential code execution.
    </Details>
    <Statement xml:lang="en:us">
This heap-based buffer overflow vulnerability in the GIMP DDS plug-in could lead to heap metadata corruption and potential code execution. The flaw is triggered when a user opens a specially crafted DDS image file. Red Hat Enterprise Linux systems with GIMP installed are affected if users process untrusted DDS files.
    </Statement>
    <Acknowledgement xml:lang="en:us">
Red Hat would like to thank HanTul for reporting this issue.
    </Acknowledgement>
    <Mitigation xml:lang="en:us">
Users should avoid opening untrusted DirectDraw Surface (DDS) image files with GIMP. As a general security practice, only process files from trusted sources. If GIMP is not essential, consider removing the `gimp` package to eliminate this attack vector.
    </Mitigation>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:6">
        <ProductName>Red Hat Enterprise Linux 6</ProductName>
        <FixState>Will not fix</FixState>
        <PackageName>gimp</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:7">
        <ProductName>Red Hat Enterprise Linux 7</ProductName>
        <FixState>Will not fix</FixState>
        <PackageName>gimp</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:8">
        <ProductName>Red Hat Enterprise Linux 8</ProductName>
        <FixState>Affected</FixState>
        <PackageName>gimp:2.8/gimp</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:9">
        <ProductName>Red Hat Enterprise Linux 9</ProductName>
        <FixState>Under investigation</FixState>
        <PackageName>gimp</PackageName>
    </PackageState>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-42170
https://nvd.nist.gov/vuln/detail/CVE-2026-42170
    </References>
</Vulnerability>