CVE-2026-82398

pypdf: Inefficient handling of non-whitespace inputs in read_until_whitespace

Published Aug 31, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
Description
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 read_until_whitespace 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.

Analysis

AI-generated

Technical impact

A vulnerability in the function read_until_whitespace within pypdf/_utils.py causes each byte of a stream to be concatenated into a new immutable bytes object one at a time. For a stream that contains a long run of non‑whitespace bytes, the routine performs a quadratic number of concatenations, leading to very high CPU usage and prolonged runtimes. The weakness is categorized as CWE‑407 (Improper Resource Allocation) and CWE‑1046.

Affected Systems

The issue affects all versions of py‑pdf:pypdf released before 6.15.0. Any application that imports and uses pypdf to process PDF files is potentially impacted.

Risk and Exploitability

The vulnerability is scored CVSS 6.9, indicating moderate severity. The EPSS score is 0.00301 (less than 1%) and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is a crafted PDF file supplied to an application using pypdf; upon parsing a stream with a long non‑whitespace sequence, the application will experience high CPU load and may become unresponsive. No network‑side or privilege escalation component is described in the information provided.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade py‑pdf:pypdf to version 6.15.0 or later.
  • Implement input validation to detect and reject PDFs containing unusually long non‑whitespace byte sequences before they reach pypdf.
  • Monitor CPU usage during PDF processing and alert on sudden spikes that may indicate exploitation attempts.

Generated by OpenCVE AI on September 1, 2026 at 15:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-fc8x-2rww-xw9m pypdf: Inefficient handling of non-whitespace inputs in read_until_whitespace
History
Type Values Removed Values Added
CPEs cpe:2.3:a:pypdf_project:pypdf:*:*:*:*:*:*:*:* cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:*
Vendors & Products Pypdf Project
Pypdf Project pypdf
Type Values Removed Values Added
First Time appeared Pypdf Project
Pypdf Project pypdf
CPEs cpe:2.3:a:pypdf_project:pypdf:*:*:*:*:*:*:*:*
Vendors & Products Pypdf Project
Pypdf Project pypdf
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses CWE-1046
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Py-pdf
Py-pdf pypdf
Vendors & Products Py-pdf
Py-pdf pypdf
Type Values Removed Values Added
Description 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 read_until_whitespace 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.
Title pypdf: Inefficient handling of non-whitespace inputs in read_until_whitespace
Weaknesses CWE-407
References
Metrics cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-1046

    Creation of Immutable Text Using String Concatenation

  • CWE-407

    Inefficient Algorithmic Complexity

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 1, 2026, 2:57 PM
Reserved
Aug 28, 2026, 10:00 PM
Status
Analyzed
Published
Aug 31, 2026, 10:17 PM
Modified
Nov 2, 2026, 4:06 PM
Severity
Moderate
Public date
Aug 31, 2026, 9:41 PM