Vulnerability · Published Jul 14, 2026 · Assigned by GitHub_M
CVE-2026-59198Pillow TGA RLE encoder can serialize up to ~57 KB of adjacent heap data into generated images
Medium 6.5
In plain English
A medium-severity out-of-bounds read in Pillow from python-pillow. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 24% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)0.3%top 75.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | pillow | no fix listed | DEBIAN-CVE-2026-59198 |
| Debian:13 | pillow | no fix listed | DEBIAN-CVE-2026-59198 |
| Debian:14 | pillow | 12.3.0-1 | DEBIAN-CVE-2026-59198 |
| PyPI | pillow | 12.3.0 | PYSEC-2026-3494 |
| PyPI | pillow | 12.3.0 | GHSA-fj7v-r99m-22gq |
| Ubuntu:22.04:LTS | pillow | 9.0.1-1ubuntu0.5 | UBUNTU-CVE-2026-59198 |
| Ubuntu:22.04:LTS | pillow | 9.0.1-1ubuntu0.5 | USN-8690-1 |
| Ubuntu:24.04:LTS | pillow | 10.2.0-1ubuntu1.3 | USN-8690-1 |
| Ubuntu:24.04:LTS | pillow | 10.2.0-1ubuntu1.3 | UBUNTU-CVE-2026-59198 |
| Ubuntu:26.04:LTS | pillow | 12.1.1-2ubuntu1.3 | USN-8690-1 |
| Ubuntu:26.04:LTS | pillow | 12.1.1-2ubuntu1.3 | UBUNTU-CVE-2026-59198 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| python-pillow | Pillow | >= 5.2.0, < 12.3.0 |
Weakness: CWE-125 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:L
References
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-fj7v-r99m-22gq x_refsource_CONFIRM
- https://github.com/python-pillow/Pillow/pull/9709 x_refsource_MISC
- https://github.com/python-pillow/Pillow/commit/eada3cbd7fb9963ee90673fb7b5270124a0d5f4b x_refsource_MISC
- https://github.com/python-pillow/Pillow/releases/tag/12.3.0 x_refsource_MISC