CVE-2026-119203: pypdf has possible infinite loop when hitting EOF in standard xref table during trailer search

Published Oct 29, 2026
·
Updated

Impact

An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires opening an incomplete file without a trailer.

Patches

This has been fixed in pypdf==6.21.4.

Workarounds

If you cannot upgrade yet, consider applying the changes from PR #4289.

Other sources

pypdf is a free and open-source pure-python PDF library. Prior to 6.21.4, pypdf can enter an infinite loop while opening a crafted incomplete PDF whose standard cross-reference table reaches the end of the file without a trailer. The trailer search can repeatedly rewind to the same stream position instead of terminating when parsing makes no progress, blocking the processing thread. This issue is fixed in version 6.21.4.

— OSV

Affected Software

7 affected componentsFixes available
debian/pypdf*
debian/pypdf*
debian/pypdf*
debian/pypdf2*
debian/pypdf<=3.4.1-1+deb12u1, <=5.4.0-1, <=6.21.1-1
debian/pypdf2<=2.12.1-3+deb12u1
pip/pypdf<6.21.4
6.21.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/pypdf to a version that resolves this vulnerability.

    Fixed in 6.21.4
  2. Upgrade

    Upgrade pypdf to a version that resolves this vulnerability.

    Fixed in 6.21.4
  3. Compensating control

    If upgrading is not yet possible, apply the changes from PR #4289.

Event History

Oct 29, 2026
CVE Published
via MITRE·08:30 PM
Data Sourced
via MITRE·08:30 PM
DescriptionWeakness
Data Sourced
via OSV·08:30 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:17 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·09:17 PM
Affected Software
Oct 30, 2026
Advisory Published
via GitHub·11:13 PM
Data Sourced
via GitHub·11:13 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Deployments using pypdf versions prior to 6.21.4 may be affected when they open attacker-controlled or otherwise incomplete PDF files. The listed affected package ecosystems are Debian pypdf, Debian pypdf2, and pip pypdf.

2

What must an attacker provide to trigger the denial of service?

The attacker needs to induce processing of a crafted incomplete PDF containing a standard cross-reference table that reaches end-of-file without a trailer. Opening the file can cause the processing thread to block in an infinite loop.

3

Does exploitation require authentication or user interaction?

The provided severity vector indicates network attackability, low attack complexity, no privileges required, and user interaction is required. The issue is triggered when the crafted PDF is opened by pypdf.

4

What should teams do if they cannot upgrade immediately?

Upgrade to pypdf 6.21.4 when possible. If an immediate upgrade is not possible, the provided workaround is to apply the changes from PR #4289.

5

How can I determine whether a running workload may be vulnerable?

Check whether it uses a pypdf version earlier than 6.21.4 and processes PDFs that may be incomplete or attacker supplied. Affected behavior occurs during trailer searching when a standard cross-reference table reaches EOF without a trailer.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203