{"id":"CVE-2026-112891","published":"2026-10-19T21:33:32Z","modified":"2026-10-20T13:54:10Z","title":"Pillow: Quadratic GIF comment copying during save","vendor":"python-pillow","product":"Pillow","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.9,"severity":"MEDIUM","version":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00609,"percentile":0.43312,"provenance":"source"},"cwes":[{"id":"CWE-407","name":"Inefficient Algorithmic Complexity"}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-fc9g-5qg7-mf45","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/python-pillow/Pillow/commit/68a3fe957d8a4d552e8c69d96066d749f0614c7e","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/13.0.0","tags":["x_refsource_MISC"]}],"priority":{"score":13.5,"factors":[{"name":"EPSS percentile","points":8.66},{"name":"CVSS severity","points":4.83}]},"vendorSlug":"python-pillow","affectedVersions":[{"vendor":"python-pillow","product":"Pillow","versions":[">= 9.2.0, < 13.0.0"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-10-20T13:53:56.051448Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"pillow","vulnerableRanges":[">=9.2.0, <13.0.0"],"patched":["13.0.0"],"from":["GHSA-fc9g-5qg7-mf45"],"provenance":"source"}],"summary":{"text":"Pillow, the Python imaging library, has a flaw in its GIF save path where the _get_global_header() routine repeatedly copies comment data, including comments carried over from untrusted input images, in a quadratic manner. An attacker who can get an application using affected Pillow versions (9.2.0 through 12.x) to save an attacker-supplied image containing a large GIF comment can exhaust CPU and delay or deny service, with no authentication or user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:43:38Z"},"euvd":{"id":"EUVD-2026-104649","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-python-pillow-pillow-cve-2022-45198","parents":[{"from":"CVE-2022-45198","to":"CVE-2026-112891","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/PIL/GifImagePlugin.py"],"commits":["https://github.com/python-pillow/Pillow/commit/11918eac0628ec8ac0812670d9838361ead2d6a4","https://github.com/python-pillow/Pillow/commit/c9f1b35e981075110a23487a8d4a6cbb59a588ea","https://github.com/python-pillow/Pillow/commit/68a3fe957d8a4d552e8c69d96066d749f0614c7e"],"basis":"shared function","functions":["_seek"]}]},{"from":"CVE-2026-112400","to":"CVE-2026-112891","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/PIL/GifImagePlugin.py"],"commits":["https://github.com/python-pillow/Pillow/commit/6faed707cfb760a4cbd726ddc8406f576cf35bf7","https://github.com/python-pillow/Pillow/commit/68a3fe957d8a4d552e8c69d96066d749f0614c7e"],"basis":"shared function","functions":["_seek"]}]}]}}