{"id":"CVE-2026-112894","published":"2026-10-19T21:55:19Z","modified":"2026-10-20T14:46:13Z","title":"Pillow: Quadratic-time DoS in PDF save_all (PdfParser.next_object_id)","vendor":"python-pillow","product":"Pillow","tier":"tail","description":{"text":"Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow takes quadratic time to reserve PDF object identifiers when saving many frames with save_all enabled. PdfParser.next_object_id() repeatedly rebuilds and scans all previously reserved identifiers for every object. An attacker can supply a multi-frame image, including a small APNG with a large declared frame count, to an application that converts it to a multipage PDF. This can consume excessive CPU and deny service. This issue is fixed in version 13.0.0.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.7,"severity":"HIGH","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00594,"percentile":0.42451,"provenance":"source"},"cwes":[{"id":"CWE-407","name":"Inefficient Algorithmic Complexity"}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-jg86-v3jv-hrpm","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/python-pillow/Pillow/commit/f6a852555f1a1bdff7781abf25f1a3b8bd6ce6cb","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/13.0.0","tags":["x_refsource_MISC"]}],"priority":{"score":14.6,"factors":[{"name":"EPSS percentile","points":8.49},{"name":"CVSS severity","points":6.09}]},"vendorSlug":"python-pillow","affectedVersions":[{"vendor":"python-pillow","product":"Pillow","versions":[">= 5.1.0, < 13.0.0"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-10-20T14:45:17.111679Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"Pillow","vulnerableRanges":[">=5.1.0, <13.0.0"],"patched":["13.0.0"],"from":["GHSA-jg86-v3jv-hrpm"],"provenance":"source"}],"summary":{"text":"The flaw is a quadratic-time algorithmic inefficiency in Pillow's PDF save_all path, specifically in PdfParser.next_object_id(), which repeatedly rebuilds and scans all previously reserved object identifiers while saving multi-frame images. An attacker who can supply a multi-frame image (such as a small APNG with a large declared frame count) to an application that converts it into a multipage PDF can trigger excessive CPU consumption and a denial of service, with no authentication or user interaction required beyond that submission.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:29:26Z"},"euvd":{"id":"EUVD-2026-104656","exploited":false,"provenance":"source"}}