---
id: CVE-2017-20286
title: >-
  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
summary: >-
  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 f…
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'
cwe:
  - CWE-787
published: '2026-10-14'
updated: '2026-10-14'
sourceUpdated: '2026-10-14T16:17:21.430'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2017-20286'
references:
  - url: >-
      https://github.com/DentonW/DevIL/blob/a2d9193fed0c7f93519c0c4c28b3348e0cb5759b/DevIL/src-IL/src/il_gif.cpp#L189-L226
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/DentonW/DevIL/blob/a2d9193fed0c7f93519c0c4c28b3348e0cb5759b/DevIL/src-IL/src/il_gif.cpp#L314-L324
    label: disclosure@vulncheck.com
  - url: 'https://github.com/DentonW/DevIL/issues/67'
    label: disclosure@vulncheck.com
  - url: 'https://hackmd.io/@haind-pwn/devil-gif-palette-reuse-heap-overflow'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/devil-through-1.8.0-heap-buffer-overflow-via-gif-igetpalette
    label: disclosure@vulncheck.com
tags:
  - nvd
ingestedAt: '2026-10-14T15:36:13.993Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
