{"id":2810,"cve":"CVE-2026-119209","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-119209\/","cwe":"CWE-400","cwe_number":400,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/400","cvss_score":7.1,"published":"2026-10-29","owasp":"A04 Insecure Design","odc":"Algorithm","cdc":"Incorrect Algorithm","category":"Resource Management","subcategory":"Resource Exhaustion","scope":"Remote","impact":"Denial of Service (DoS)","summary":"Memory exhaustion via crafted PDF cross\u2011reference streams in pypdf.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-119209\/","description":"pypdf is a free and open-source pure-python PDF library. Prior to 6.21.3, pypdf can consume excessive memory while opening a crafted PDF containing cross-reference streams that declare very large entry counts. Highly compressible streams and \/Prev chains can multiply the number of parsed entries across a document, while negative \/Index counts can bypass the existing per-stream clamp. This issue is fixed in version 6.21.3.","solution":"Upgrade pypdf to version\u202f6.21.3\u202for later.","affected_component":"pypdf","fixed_by_upgrading":true,"vulnerable_code":"import io\nfrom pypdf import PdfReader\n\ndef load_pdf(data: bytes):\n    # VULNERABLE: unbounded cross\u2011reference entry parsing\n    stream = io.BytesIO(data)\n    reader = PdfReader(stream)  # no limit on entry count\n    return reader.metadata\n","patched_code":"import io\nfrom pypdf import PdfReader\n\ndef load_pdf(data: bytes):\n    # FIX: enforce a maximum entry count to prevent exhaustion\n    stream = io.BytesIO(data)\n    reader = PdfReader(stream, max_entry_count=10000)\n    return reader.metadata\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[{"repository":"py-pdf\/pypdf","commit_url":"https:\/\/github.com\/py-pdf\/pypdf\/commit\/a93fe3a901fd00af38f0a105c3ba7175fa72dcb4","commit_subject":"SEC: Limit total number of cross-reference stream entries (#4269)","units":[{"file":"pypdf\/_reader.py","function":null},{"file":"pypdf\/_reader.py","function":"PdfReader._read_pdf15_xref_stream"},{"file":"pypdf\/_reader.py","function":"PdfReader._read_xref_tables_and_trailers"},{"file":"pypdf\/_reader.py","function":"PdfReader._sanitize_pdf15_xref_stream_index_pairs"},{"file":"pypdf\/_reader.py","function":"PdfReader.__init__"}]}],"references":null}