6.9medium
Pillow: Quadratic GIF comment copying during save
- Severity
- 6.9medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.55% (higher than 47% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-fc9g-5qg7-mf45BIT-PILLOW-2026-112891
Description
Pillow is a Python imaging library. From 9.2.0 until 13.0.0, Pillow performs quadratic copying when saving a GIF with a long comment. _get_global_header() repeatedly copies portions of comment data while assembling the global header, including comments retained from an untrusted input image. An attacker can supply an image with a large GIF comment to an application that saves it as GIF. This can consume excessive CPU and delay or deny service. This issue is fixed in version 13.0.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| python-pillow Pillow | >= 9.2.0, < 13.0.0 | CVE List |
| pillow (PyPI) | from 9.2.0 before 13.0.0 | GitHub Advisory Database |
| python pillow | from 9.2.0 before 13.0.0 | NVD |
| pillow (Bitnami) | from 9.2.0 before 13.0.0 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 6.9medium CVSS:4.0 | 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 |
| GitHub | medium CVSS:4.0 | 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 |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| Bitnami Vulnerability Database | high rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
Pillow is a Python imaging library. From 9.2.0 until 13.0.0, Pillow performs quadratic copying when saving a GIF with a long comment. _get_global_header() repeatedly copies portions of comment data while assembling the global header, including comments retained from an untrusted input image. An attacker can supply an image with a large GIF comment to an application that saves it as GIF. This can consume excessive CPU and delay or deny service. This issue is fixed in version 13.0.0.
GitHub Advisory Database
On Pillow 12.3.0 and upstream main (ad277e2761b489681e71b51e91367d46b0ceabb9), a GIF with a long comment makes _get_global_header() copy portions of the comment repeatedly when saving, including comments carried over from untrusted images. I suggest provisional Moderate severity for crafted-image CPU denial of service, with CVSS-B 6.9 assuming a network service automatically opens unauthenticated uploads and they are resaved as GIFs; impact depends on input-size, concurrency, and worker CPU limits.
References
| https://github.com/python-pillow/Pillow/security/advisories/GHSA-fc9g-5qg7-mf45 | advisory, vendor-advisory, web | |
| https://github.com/python-pillow/Pillow/commit/68a3fe957d8a4d552e8c69d96066d749f0614c7e | fix, patch, web | |
| https://github.com/python-pillow/Pillow/releases/tag/13.0.0 | article, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-112891 | advisory, web | |
| https://github.com/python-pillow/Pillow | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-112891 changed 2026-10-20 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-fc9g-5qg7-mf45 changed 2026-10-26 | CC-BY-4.0 |
| NVD | CVE-2026-112891 changed 2026-10-27 | Public domain |
| Bitnami Vulnerability Database | BIT-PILLOW-2026-112891 changed 2026-10-29 | Apache-2.0 |