CVE-2026-82398: pypdf: Inefficient handling of non-whitespace inputs in read_until_whitespace

Published Aug 31, 2026
·
Updated

Impact An attacker who uses this vulnerability can craft a PDF which leads to long runtimes. This requires a call to readuntilwhitespace with an input which does not have whitespace for a long time.

Patches This has been fixed in pypdf==6.15.0.

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

Other sources

pypdf is a free and open-source pure-python PDF library. Prior to 6.15.0, an attacker can craft a PDF that causes long runtimes when the pypdf/utils.py function readuntilwhitespace reads a stream containing a long run of bytes without whitespace. The function repeatedly performs immutable bytes concatenation in a one-byte loop, causing quadratic processing cost for the long non-whitespace input. This issue is fixed in version 6.15.0.

NVD

Affected Software

2 affected componentsFixes available
pypdf<6.15.0
pip/pypdf<6.15.0
6.15.0

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.15.0
  2. Upgrade

    Upgrade pypdf to a version that resolves this vulnerability.

    Fixed in 6.15.0
  3. Compensating control

    If you cannot upgrade yet, apply the changes from PR [#3947] to mitigate the inefficient handling of non-whitespace inputs in pypdf/_utils.py read_until_whitespace.

Event History

Aug 31, 2026
CVE Published
via MITRE·09:41 PM
Data Sourced
via MITRE·09:41 PM
DescriptionWeakness
Data Sourced
via NVD·10:17 PM
DescriptionSeverityWeakness
Sep 2, 2026
Advisory Published
via GitHub·02:38 PM
Data Sourced
via GitHub·02:38 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Deployments using pypdf versions earlier than 6.15.0 are affected when they process attacker-crafted PDF input. The issue is triggered while read_until_whitespace handles a stream containing a long sequence of bytes without whitespace.

2

What does an attacker need to do to trigger the problem?

An attacker needs to supply a crafted PDF containing a long non-whitespace byte run that reaches the affected parsing function. Processing that input can cause long runtimes because the function appends immutable bytes one byte at a time.

3

What is the remediation?

Upgrade pypdf to version 6.15.0, which fixes the inefficient handling in read_until_whitespace.

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