{"id":"CVE-2026-112406","published":"2026-10-19T21:31:49Z","modified":"2026-10-20T16:08:57Z","title":"Pillow: Infinite loop in PdfParser.rewrite_pages on page tree Parent cycle","vendor":"python-pillow","product":"Pillow","tier":"tail","description":{"text":"Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow can enter an infinite loop while rewriting PDF pages. PdfParser.rewrite_pages() follows Parent relationships without detecting a cycle in the page tree. An attacker can supply a cyclic PDF to an application that appends an image to that PDF. This can hold the worker at full 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.00573,"percentile":0.48246,"provenance":"source"},"cwes":[{"id":"CWE-835","name":"Loop with Unreachable Exit Condition"}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-f2g6-542v-9j58","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/python-pillow/Pillow/commit/b3ebf20c694f2f12537a629c30229a1d5a53f777","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/13.0.0","tags":["x_refsource_MISC"]}],"priority":{"score":15.7,"factors":[{"name":"EPSS percentile","points":9.65},{"name":"CVSS severity","points":6.09}]},"vendorSlug":"python-pillow","affectedVersions":[{"vendor":"python-pillow","product":"Pillow","versions":[">= 5.1.0, < 13.0.0"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-10-20T15:19:04.898565Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"Pillow","vulnerableRanges":[">=5.1.0, <13.0.0"],"patched":["13.0.0"],"from":["GHSA-f2g6-542v-9j58"],"provenance":"source"}],"summary":{"text":"Pillow, the Python imaging library, has a flaw in PdfParser.rewrite_pages, which follows Parent relationships in a PDF page tree without detecting cycles, causing an infinite loop affecting versions from 5.1.0 through 12.x. An attacker who can supply a cyclic PDF to an application that appends an image to that PDF can pin the worker at full CPU and cause a denial of service, with no authentication, user interaction, or special configuration required beyond that application processing the file.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:38:23Z"},"euvd":{"id":"EUVD-2026-104648","exploited":false,"provenance":"source"}}