{"id":"CVE-2026-42310","aliases":["CVE-2026-42310","GHSA-r73j-pqj5-w3x7","BIT-PILLOW-2026-42310","PYSEC-2026-2874"],"related":[],"kind":"vulnerability","state":"published","title":"Pillow: PDF Parsing Trailer Infinite Loop (DoS)","summary":"Pillow is a Python imaging library. From version 4.2.0 to before version 12.2.0, an attacker can supply a malicious PDF that causes the process to hang indefinitely, consuming 100% CPU and making the application unresponsive. This issue has been patched in version 12.2.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Pillow is a Python imaging library. From version 4.2.0 to before version 12.2.0, an attacker can supply a malicious PDF that causes the process to hang indefinitely, consuming 100% CPU and making the application unresponsive. This issue has been patched in version 12.2.0.","source":"cvelist"},{"lang":"en","text":"### Impact\nAn attacker can supply a malicious PDF that causes the process to hang indefinitely, consuming 100% CPU and making the application unresponsive.\n\n### Patches\nPatched version: 12.2.0.\n\nPdfParser (introduced in Pillow 4.2.0) follows Prev pointers in PDF trailers to read cross-reference sections. If a\ntrailer's Prev pointer references an offset that has already been processed — either pointing to itself or forming a\nlonger cycle — the parser enters an infinite loop. Pillow now tracks previously processed trailer offsets and raises an\nerror if a cycle is detected.\n\n### Workarounds\nUse any version but the affected versions: >= 4.2.0, < 12.2.0\n\n### Resources\n - Fix: https://github.com/python-pillow/Pillow/pull/9519","format":"markdown","source":"ghsa"},{"lang":"es","text":"Pillow es una biblioteca de procesamiento de imágenes de Python. Desde la versión 4.2.0 hasta antes de la versión 12.2.0, un atacante puede proporcionar un PDF malicioso que hace que el proceso se cuelgue indefinidamente, consumiendo el 100% de la CPU y haciendo que la aplicación no responda. Este problema ha sido parcheado en la versión 12.2.0.","source":"nvd"}],"published":"2026-05-04T20:19:30.000Z","modified":"2026-09-10T03:50:55.309Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","score":5.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/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:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-835"],"affected":[{"ranges":[{"version":">= 4.2.0, < 12.2.0","status":"affected"}],"vendor":"python-pillow","product":"Pillow","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"4.2.0","status":"affected","fixed":"12.2.0"}],"ecosystem":"PyPI","package":"pillow","purl":"pkg:pypi/pillow","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"4.2.0","fixed":"12.2.0"}],"vendor":"python","product":"pillow","cpe":"cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"4.2.0","status":"affected","fixed":"12.2.0"}],"ecosystem":"PyPI","package":"pillow","purl":"pkg:pypi/pillow","source":"pysec"},{"ranges":[{"type":"semver","introduced":"4.2.0","status":"affected","fixed":"12.2.0"}],"ecosystem":"Bitnami","package":"pillow","purl":"pkg:bitnami/pillow","source":"bitnami"}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-r73j-pqj5-w3x7","tags":["advisory","patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/python-pillow/Pillow/pull/9519","tags":["fix","issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/python-pillow/Pillow/commit/3bf614e4b8615d0ce1d5039efaf6db447fe7c468","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/12.2.0","tags":["article","product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42310","tags":["advisory","web"],"sources":["ghsa","pysec","bitnami"]},{"url":"https://github.com/python-pillow/Pillow","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/pillow","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-r73j-pqj5-w3x7","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-05-12T13:33:37.176Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42310","url":"https://www.cve.org/CVERecord?id=CVE-2026-42310","licence":"CVE Terms of Use","modified":"2026-05-12T18:31:10.271Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-r73j-pqj5-w3x7","url":"https://github.com/advisories/GHSA-r73j-pqj5-w3x7","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:55.309Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42310","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42310","licence":"Public domain","modified":"2026-07-24T21:10:00.143Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2874","url":"https://osv.dev/vulnerability/PYSEC-2026-2874","licence":"CC-BY-4.0","modified":"2026-07-13T16:42:37.358Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PILLOW-2026-42310","url":"https://osv.dev/vulnerability/BIT-PILLOW-2026-42310","licence":"Apache-2.0","modified":"2026-09-08T08:48:18.525Z"}],"updatedAt":"2026-11-25T22:59:21.140Z","epss":{"score":0.00171,"percentile":0.06845,"date":"2026-12-01T12:00:22.000Z"}}