CVE-2026-102997

pypdf: Possible long runtimes for partially malformed FlateDecode streams (Follow-up)

Published Sep 30, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.18.1, a crafted PDF containing a partially malformed /FlateDecode stream with padded data can force pypdf/filters.py to use inefficient byte-by-byte decompression while the earlier recovery counter fails to advance for bytes that successfully decode, causing long runtimes and application unavailability. This is a residual issue after the malformed FlateDecode recovery fix. This issue is fixed in version 6.18.1.

Analysis

AI-generated

Technical impact

The vulnerability involves a partially malformed /FlateDecode stream containing padded data. When processed by pypdf/filters.py the library falls back to a byte‑by‑byte decompression loop and the recovery counter does not advance for successfully decoded bytes, leading to extremely long runtimes and eventual application unavailability. This constitutes a denial‑of‑service condition caused by resource exhaustion and inefficient algorithm use.

Affected Systems

The issue affects the py‑pdf:pypdf library in all releases before version 6.18.1. Any application that imports pypdf and parses user supplied PDFs is potentially impacted, including automating PDF generation or conversion tasks. Version 6.18.1 and later contain the fix.

Risk and Exploitability

The CVSS score of 8.7 rates the flaw as high severity. The EPSS score is not available, and the vulnerability is not listed in CISA KEV, suggesting it may not yet be actively exploited. The attack is possible if an adversary can supply a crafted PDF to a target system that uses pypdf; the exploitation requires no special privileges beyond the ability to deliver the PDF to the application. Successful exploitation can lead to prolonged processing times or hang the service. The risk is elevated in environments that trust external PDFs or expose PDF handling over a network.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the pypdf Python library to version 6.18.1 or newer, which contains the deflation stream bug fix.
  • Implement a processing timeout or watchdog around pypdf calls to limit execution time and prevent hangs caused by malformed streams.
  • Validate incoming PDF files against the pypdf library’s schema or remove the /FlateDecode filter before parsing when possible, to reduce the attack surface.

Generated by OpenCVE AI on October 1, 2026 at 01:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-jw7q-gvrg-4vj3 pypdf: Possible long runtimes for partially malformed FlateDecode streams (Follow-up)
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': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

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
Weaknesses CWE-835
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Important

Type Values Removed Values Added
Description pypdf is a free and open-source pure-python PDF library. Prior to 6.18.1, a crafted PDF containing a partially malformed /FlateDecode stream with padded data can force pypdf/filters.py to use inefficient byte-by-byte decompression while the earlier recovery counter fails to advance for bytes that successfully decode, causing long runtimes and application unavailability. This is a residual issue after the malformed FlateDecode recovery fix. This issue is fixed in version 6.18.1.
Title pypdf: Possible long runtimes for partially malformed FlateDecode streams (Follow-up)
Weaknesses CWE-400
CWE-407
References
Metrics cvssV4_0

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

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-407

    Inefficient Algorithmic Complexity

  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 2, 2026, 4:33 PM
Reserved
Sep 29, 2026, 8:46 PM
Status
Analyzed
Published
Sep 30, 2026, 9:17 PM
Modified
Nov 2, 2026, 4:06 PM
Severity
Important
Public date
Sep 30, 2026, 8:05 PM