{"id":"CVE-2026-112891","aliases":["CVE-2026-112891","GHSA-fc9g-5qg7-mf45","BIT-PILLOW-2026-112891"],"related":[],"kind":"vulnerability","state":"published","title":"Pillow: Quadratic GIF comment copying during save","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"}],"published":"2026-10-19T21:33:32.180Z","modified":"2026-10-29T10:45:09.282Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-407"],"affected":[{"ranges":[{"version":">= 9.2.0, < 13.0.0","status":"affected"}],"vendor":"python-pillow","product":"Pillow","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"9.2.0","status":"affected","fixed":"13.0.0"}],"ecosystem":"PyPI","package":"pillow","purl":"pkg:pypi/pillow","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"9.2.0","fixed":"13.0.0"}],"vendor":"python","product":"pillow","cpe":"cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"9.2.0","status":"affected","fixed":"13.0.0"}],"ecosystem":"Bitnami","package":"pillow","purl":"pkg:bitnami/pillow","source":"bitnami"}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-fc9g-5qg7-mf45","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/python-pillow/Pillow/commit/68a3fe957d8a4d552e8c69d96066d749f0614c7e","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/13.0.0","tags":["article","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-112891","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/python-pillow/Pillow","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-10-20T13:53:56.051Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-112891","url":"https://www.cve.org/CVERecord?id=CVE-2026-112891","licence":"CVE Terms of Use","modified":"2026-10-20T13:54:10.370Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fc9g-5qg7-mf45","url":"https://github.com/advisories/GHSA-fc9g-5qg7-mf45","licence":"CC-BY-4.0","modified":"2026-10-26T08:56:06.483Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-112891","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-112891","licence":"Public domain","modified":"2026-10-27T14:59:43.613Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PILLOW-2026-112891","url":"https://osv.dev/vulnerability/BIT-PILLOW-2026-112891","licence":"Apache-2.0","modified":"2026-10-29T10:45:09.282Z"}],"updatedAt":"2026-11-25T22:59:45.956Z","epss":{"score":0.00549,"percentile":0.47378,"date":"2026-12-01T12:00:22.000Z"}}