<Vulnerability name="CVE-2017-20286">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Important</ThreatSeverity>
    <PublicDate>2026-10-14T14:16:27</PublicDate>
    <Bugzilla id="2552259" url="https://bugzilla.redhat.com/show_bug.cgi?id=2552259" xml:lang="en:us">
DevIL: DevIL: Arbitrary code execution via crafted GIF image
    </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-787</CWE>
    <Details xml:lang="en:us" source="Mitre">
DevIL through 1.8.0 contains a heap-based buffer overflow in iGetPalette() in il_gif.cpp that allows attackers to write beyond a 768-byte palette buffer when loading GIF images. Attackers can supply a crafted two-frame GIF whose second frame uses disposal method 1 with a local colour table, writing up to 384 controlled bytes past the heap allocation and possibly executing code.
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
A flaw was found in DevIL. A heap-based buffer overflow exists in its palette handling routine when decoding GIF (Graphics Interchange Format) files. By convincing a user or system to process a specially crafted GIF image, an attacker could trigger out-of-bounds memory writes, potentially leading to arbitrary code execution or causing the application to crash.
    </Details>
    <Statement xml:lang="en:us">
A heap-based buffer overflow flaw, rated important severity, was found in DevIL (Developer's Image Library) in the GIF palette handling routine iGetPalette() in il_gif.cpp. When an application linked against DevIL loads a specially crafted GIF image, such as a two-frame GIF whose second frame uses disposal method 1 with a local colour table, the library can write up to 384 controlled bytes beyond a 768-byte heap-allocated palette buffer. Successful exploitation can cause memory corruption leading to an application crash or possible arbitrary code execution in the context of the user running the application. Exploitation requires a victim or an automated process to open a malicious GIF file, and no privileges are required beyond delivering that file. Red Hat and upstream both rate this flaw CVSS v3.1 7.8 (IMPORTANT); upstream additionally publishes a CVSS v4.0 score of 8.5. In Red Hat's product scope this issue affects the DevIL package in Fedora, where a fix is being pursued through the Fedora community project.
    </Statement>
    <Mitigation xml:lang="en:us">
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
    </Mitigation>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2017-20286
https://nvd.nist.gov/vuln/detail/CVE-2017-20286
https://github.com/DentonW/DevIL/blob/a2d9193fed0c7f93519c0c4c28b3348e0cb5759b/DevIL/src-IL/src/il_gif.cpp#L189-L226
https://github.com/DentonW/DevIL/blob/a2d9193fed0c7f93519c0c4c28b3348e0cb5759b/DevIL/src-IL/src/il_gif.cpp#L314-L324
https://github.com/DentonW/DevIL/issues/67
https://hackmd.io/@haind-pwn/devil-gif-palette-reuse-heap-overflow
https://www.vulncheck.com/advisories/devil-through-1.8.0-heap-buffer-overflow-via-gif-igetpalette
    </References>
</Vulnerability>