# CVE-2026-59198: Pillow TGA RLE encoder can serialize up to ~57 KB of adjacent heap data into generated images

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L`
- 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.31%, higher than 26% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-14T16:07:56.562Z
- Modified: 2026-10-24T21:10:00.130Z
- Also known as: GHSA-fj7v-r99m-22gq, BIT-PILLOW-2026-59198, PYSEC-2026-3494
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Pillow is a Python imaging library. From 5.2.0 until 12.3.0, Pillow's TGA RLE encoder reads past its packed row buffer when saving a mode 1 image with TGA RLE compression, allowing adjacent process heap bytes to be copied into the generated TGA file. This issue is fixed in version 12.3.0.

(As written by CVE List.)

## Affected

- python-pillow Pillow: >= 5.2.0, < 12.3.0
- pillow (PyPI): from 5.2.0 before 12.3.0
- python pillow: from 5.2.0 before 12.3.0
- pillow (Bitnami): from 5.2.0 before 12.3.0

## Every score

- GitHub_M: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- PyPA Advisory Database: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/python-pillow/Pillow/security/advisories/GHSA-fj7v-r99m-22gq> (exploit, advisory, vendor-advisory, web)
- <https://github.com/python-pillow/Pillow/pull/9709> (fix, issue-tracking, patch, web)
- <https://github.com/python-pillow/Pillow/commit/eada3cbd7fb9963ee90673fb7b5270124a0d5f4b> (fix, patch, web)
- <https://github.com/python-pillow/Pillow/releases/tag/12.3.0> (article, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-59198> (advisory, web)
- <https://github.com/python-pillow/Pillow> (package)
- <https://pypi.org/project/pillow> (package)
- <https://github.com/advisories/GHSA-fj7v-r99m-22gq> (advisory)

## Sources

- CVE List: [CVE-2026-59198](https://www.cve.org/CVERecord?id=CVE-2026-59198), CVE Terms of Use, modified 2026-07-14
- GitHub Advisory Database: [GHSA-fj7v-r99m-22gq](https://github.com/advisories/GHSA-fj7v-r99m-22gq), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-59198](https://nvd.nist.gov/vuln/detail/CVE-2026-59198), Public domain, modified 2026-10-24
- PyPA Advisory Database: [PYSEC-2026-3494](https://osv.dev/vulnerability/PYSEC-2026-3494), CC-BY-4.0, modified 2026-07-23
- Bitnami Vulnerability Database: [BIT-PILLOW-2026-59198](https://osv.dev/vulnerability/BIT-PILLOW-2026-59198), Apache-2.0, modified 2026-09-08

---

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