CVE-2026-22691: pypdf has possible long runtimes for malformed startxref

Published Jan 9, 2026
·
Updated

Impact An attacker who exploits this vulnerability can craft a PDF which leads to possibly long runtimes for invalid startxref entries. When rebuilding the cross-reference table, PDF files with lots of whitespace characters become problematic. Only the non-strict reading mode is affected.

Patches This has been fixed in pypdf==6.6.0.

Workarounds

python from pypdf import PdfReader, PdfWriter

Instead of reader = PdfReader("file.pdf") use the strict mode: reader = PdfReader("file.pdf", strict=True)

Instead of writer = PdfWriter(clonefrom="file.pdf") use an explicit strict reader: writer = PdfWriter(clonefrom=PdfReader("file.pdf", strict=True))

Resources This issue has been fixed in #3594.

Other sources

pypdf is a free and open-source pure-python PDF library. Prior to version 6.6.0, pypdf has possible long runtimes for malformed startxref. An attacker who uses this vulnerability can craft a PDF which leads to possibly long runtimes for invalid startxref entries. When rebuilding the cross-reference table, PDF files with lots of whitespace characters become problematic. Only the non-strict reading mode is affected. Only the non-strict reading mode is affected. This issue has been patched in version 6.6.0.

MITRE

Affected Software

3 affected componentsFixes available
pypi/pypdf<6.6.0
pip/pypdf<6.6.0
6.6.0
Pypdf Project Pypdf<6.6.0

Event History

Jan 9, 2026
Advisory Published
via GitHub·07:48 PM
Data Sourced
via GitHub·07:48 PM
DescriptionWeaknessAffected Software
Jan 10, 2026
CVE Published
via MITRE·04:46 AM
Data Sourced
via MITRE·04:46 AM
DescriptionWeakness
Data Sourced
via NVD·05:16 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:16 AM
RemedyAffected Software
Aug 28, 58046
Event
via FIRST·11:31 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-22691?

CVE-2026-22691 has a moderate severity due to potential long runtimes caused by malformed PDF startxref entries.

2

How do I fix CVE-2026-22691?

To fix CVE-2026-22691, upgrade to pypdf version 6.6.0 or higher.

3

What versions of pypdf are affected by CVE-2026-22691?

Versions of pypdf prior to 6.6.0 are affected by CVE-2026-22691.

4

What could happen if I don't address CVE-2026-22691?

If not addressed, CVE-2026-22691 could lead to performance issues due to long runtimes when processing malformed PDF files.

5

Is CVE-2026-22691 exploitable in all use cases of pypdf?

CVE-2026-22691 is exploitable when pypdf is used to parse or process crafted PDF files with invalid startxref entries.

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