CVE-2026-119203: pypdf infinite loop in PDF cross-reference parsing

CVE-2026-119203 · Severity: high · CVSS 4 · Published 2026-10-29

pypdf is a Python library for reading and writing PDF files. A maliciously crafted incomplete PDF can cause pypdf to enter an infinite loop when parsing the file's cross-reference table, blocking the application thread and preventing further processing. This results in a denial-of-service condition for any application using the library to process untrusted PDFs.

Technologies: Pypdf, pypdf (PyPI). Vendors: Pypdf, PyPI.

Quick answers

Is CVE-2026-119203 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-119203 being exploited in the wild.
How severe is CVE-2026-119203?
High severity, with a CVSS score of 4, published 29 October 2026.
Which products and versions are affected?
Pypdf before 6.21.4; pypdf (PyPI) < 6.21.4, ECOSYSTEM:introduced=0,fixed=6.21.4.
Is there a fix for CVE-2026-119203?
Yes. pypdf (PyPI): upgrade to 6.21.4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-119203 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-119203?
Check whether you run Pypdf or pypdf (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • pypdf (PyPI): upgrade to 6.21.4 or later
    pip install "pypdf>=6.21.4"

Technical details

The vulnerability exists in the standard cross-reference table parsing routine (_read_standard_xref_table). When a malformed PDF's xref table reaches end-of-file without a proper trailer keyword, the parser can rewind to the same stream position repeatedly instead of terminating, causing an infinite loop. The fix detects when the parser rewinds to a previously seen position and raises an exception, preventing the denial-of-service.

Affected products

  • pypdf pypdf before 6.21.4

Identifiers

  • CVE-2026-119203
  • GHSA-5849-834g-hvw5

Timeline

  • 2026-10-28: patched: Fix merged in PR #4289
  • 2026-10-29: advisory

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.