{"id":"CVE-2026-113786","kind":"vulnerability","aliases":["CVE-2026-113786","GHSA-5hx5-vpf9-5wcv"],"related":[],"title":"pypdf: Unvalidated JPEG image data loading","description":"### Impact\n\nAn attacker who uses this vulnerability can craft a PDF which leads to arbitrary image parsers being called. This requires loading an image which claims to use the `/DCTDecode` filter (JPEG data).\n\nUsers which do not have the optional *Pillow* dependency installed in their environment are not affected.\n\n### Patches\n\nThis has been fixed in [pypdf==6.21.1](https://github.com/py-pdf/pypdf/releases/tag/6.21.1).\n\n### Workarounds\n\nIf you cannot upgrade yet, consider applying the changes from PR [#4222](https://github.com/py-pdf/pypdf/pull/4222).","summary":"pypdf does not validate JPEG (/DCTDecode) image data before handing it to image parsers, so a crafted PDF can cause arbitrary image parsers to be invoked. The advisory describes this as only reachable when the optional Pillow dependency is installed.","severity":"low","cvss":2.3,"epss":0.0037499999161809683,"exploited":false,"exploited_at":null,"products":[{"name":"pypdf","fixed":["6.21.1"],"affected":"< 6.21.1","ecosystem":"pypi"}],"ecosystems":["pypi"],"tags":["cwe-183","cwe-20","package","pdf-processing","pypdf","python"],"not_affected_if":["no-untrusted-pdfs","pillow-not-installed"],"how_to_check":"pip show pypdf and pip show pillow; affected if pypdf is below 6.21.1 and Pillow is installed.","fix":"Upgrade pypdf to 6.21.1 or later. If you cannot upgrade, apply the changes from PR #4222 (https://github.com/py-pdf/pypdf/pull/4222).","status":"open","published_at":"2026-10-21T15:17:16+00:00","first_seen_at":"2026-10-23T19:11:32+00:00","triaged_at":"2026-10-23T20:10:19+00:00","updated_at":"2026-10-23T21:57:28+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-23T20:10:19Z","model":"claude-haiku-5-5","output":{"fix":"Upgrade pypdf to 6.21.1 or later. If you cannot upgrade, apply the changes from PR #4222 (https://github.com/py-pdf/pypdf/pull/4222).","summary":"pypdf does not validate JPEG (/DCTDecode) image data before handing it to image parsers, so a crafted PDF can cause arbitrary image parsers to be invoked. The advisory describes this as only reachable when the optional Pillow dependency is installed.","category":"package","who_cares":["python","pypdf","pdf-processing"],"confidence":0.7,"analyst_note":"","how_to_check":"pip show pypdf and pip show pillow; affected if pypdf is below 6.21.1 and Pillow is installed.","needs_analyst":false,"not_affected_if":["pillow-not-installed","no-untrusted-pdfs"],"severity_if_unknown":"low"},"cost_usd":0.000373,"input_tokens":2170,"output_tokens":311,"severity_before":"low"},"analyst_status":null,"analyst_note":null,"search":"'-113786':9A,17A '-183':20B '-20':22B '-2026':8A,16A '/dctdecode':34B,98C '/py-pdf/pypdf/pull/4222).':144C '/py-pdf/pypdf/releases/tag/6.21.1).':128C '4222':141C '5hx5':12A '5wcv':14A '6.21.1':125C 'advisori':56B 'affect':117C 'appli':136C 'arbitrari':49B,83C 'attack':71C 'call':87C 'cannot':132C 'caus':48B 'chang':138C 'claim':94C 'consid':135C 'craft':45B,77C 'cve':7A,15A 'cwe':19B,21B 'data':5A,36B,101C 'depend':66B,110C 'describ':57B 'environ':114C 'filter':99C 'fix':122C 'ghsa':11A 'ghsa-5hx5-vpf9-5wcv':10A 'github.com':127C,143C 'github.com/py-pdf/pypdf/pull/4222).':142C 'github.com/py-pdf/pypdf/releases/tag/6.21.1).':126C 'hand':38B 'imag':4A,35B,41B,50B,84C,92C 'impact':69C 'instal':68B,111C 'invok':54B 'jpeg':3A,33B,100C 'lead':81C 'load':6A,90C 'option':64B,108C 'packag':23B 'parser':42B,51B,85C 'patch':118C 'pdf':25B,46B,79C 'pdf-process':24B 'pillow':65B,109C 'pr':140C 'process':26B 'pypdf':1A,18A,27B,29B,124C 'python':28B 'reachabl':61B 'requir':89C 'unvalid':2A 'upgrad':133C 'use':73C,96C 'user':102C 'valid':32B 'vpf9':13A 'vulner':75C 'workaround':129C 'yet':134C","nicknames":[],"mitigations":[],"who_affected":null,"tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-21T15:17:16+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-5hx5-vpf9-5wcv","url":"https://github.com/advisories/GHSA-5hx5-vpf9-5wcv","severity":"low","published_at":"2026-10-21T19:58:10+00:00","modified_at":"2026-10-21T19:58:11+00:00","first_seen_at":"2026-10-23T19:11:32+00:00","fetched_at":"2026-10-23T19:11:32+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-113786","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-113786","severity":null,"published_at":"2026-10-21T15:17:16+00:00","modified_at":"2026-10-22T16:46:48+00:00","first_seen_at":"2026-10-23T21:57:28+00:00","fetched_at":"2026-10-23T22:29:01+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}