# CVE-2026-28231: pillow_heif Has Integer Overflow in Encode Path Buffer Validation that Leads to Heap Out-of-Bounds Read

- Severity: Medium 5.5 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.69%, higher than 54% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-02-27T20:13:45.195Z
- Modified: 2026-07-20T19:15:27.655Z
- Also known as: GHSA-5gjj-6r7v-ph3x, PYSEC-2026-2248, PYSEC-2026-2258
- Weaknesses: CWE-125, CWE-190
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

pillow_heif is a Python library for working with HEIF images and plugin for Pillow. Prior to version 1.3.0, an integer overflow in the encode path buffer validation of `_pillow_heif.c` allows an attacker to bypass bounds checks by providing large image dimensions, resulting in a heap out-of-bounds read. This can lead to information disclosure (server heap memory leaking into encoded images) or denial of service (process crash). No special configuration is required — this triggers under default settings. Version 1.3.0 fixes the issue.

(As written by CVE List.)

## Affected

- bigcat88 pillow_heif: < 1.3.0
- pi-heif (PyPI): before 1.3.0
- pillow-heif (PyPI): before 1.3.0
- bigcat88 pillow-heif: before 1.3.0

## Every score

- GitHub_M: CVSS:4.0 5.5 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P`
- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`
- PyPA Advisory Database: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H`

## References

- <https://github.com/bigcat88/pillow_heif/security/advisories/GHSA-5gjj-6r7v-ph3x> (exploit, evidence, mitigation, vendor-advisory, web)
- <https://github.com/bigcat88/pillow_heif/commit/8305a15d3780c533b762578cbe987d27a2c59c7a> (fix, patch, web)
- <https://github.com/bigcat88/pillow_heif/releases/tag/v1.3.0> (advisory, product, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-28231> (advisory)
- <https://github.com/bigcat88/pillow_heif> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/pi-heif/PYSEC-2026-2248.yaml> (web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/pillow-heif/PYSEC-2026-2258.yaml> (web)

## Sources

- CVE List: [CVE-2026-28231](https://www.cve.org/CVERecord?id=CVE-2026-28231), CVE Terms of Use, modified 2026-03-03
- GitHub Advisory Database: [GHSA-5gjj-6r7v-ph3x](https://github.com/advisories/GHSA-5gjj-6r7v-ph3x), CC-BY-4.0, modified 2026-07-20
- NVD: [CVE-2026-28231](https://nvd.nist.gov/vuln/detail/CVE-2026-28231), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-2248](https://osv.dev/vulnerability/PYSEC-2026-2248), CC-BY-4.0, modified 2026-07-13
- PyPA Advisory Database: [PYSEC-2026-2258](https://osv.dev/vulnerability/PYSEC-2026-2258), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-28231 · Whole record: https://cve.day/CVE-2026-28231.json · Rebuilt by cve.day 2026-11-25T22:59:15.042Z
