CVE-2026-27025

pypdf has possible long runtimes/large memory usage for large /ToUnicode streams

Published Feb 20, 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.7.1, an attacker who uses this vulnerability can craft a PDF which leads to long runtimes and large memory consumption. This requires parsing the /ToUnicode entry of a font with unusually large values, for example during text extraction. This vulnerability is fixed in 6.7.1.

Analysis

AI-generated

Technical impact

A crafted PDF containing unusually large values in the /ToUnicode stream can cause the pypdf library to consume excessive memory and run for extended periods during parsing. This vulnerability is a classic resource‑exhaustion flaw that can interrupt normal processing, potentially leading to application crashes or degraded performance. The weakness aligns with CWE‑1050 (Resource Exhaustion) and CWE‑834 (Unchecked Input Leading to System Failure).

Affected Systems

All versions of the pypdf Python library released before 6.7.1 are vulnerable. Applications that import and use pypdf to read or extract text from PDF documents are at risk unless they upgrade to the fixed 6.7.1 release or later.

Risk and Exploitability

The CVSS score of 6.9 indicates a moderate severity, while the EPSS score of less than 1% suggests a low likelihood of active exploitation as of the latest assessment. This vulnerability is not listed in the CISA KEV catalog. Exploitation requires an attacker to deliver a malicious PDF file to a system that processes it with pypdf, either locally or through a web interface that accepts user‑supplied PDFs. The impact is limited to the device or application performing the parsing; it does not directly grant code execution or data exfiltration.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the pypdf package to version 6.7.1 or later, which removes the vulnerability.
  • If an upgrade is not immediately feasible, sanitize incoming PDFs to remove or truncate large /ToUnicode streams before passing them to pypdf, or use an alternative library for problematic files.
  • Implement application‑level memory and time limits when invoking pypdf, ensuring that resource exhaustion cannot bring down the service.

Generated by OpenCVE AI on April 17, 2026 at 17:09 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-wgvp-vg3v-2xq3 pypdf has possible long runtimes/large memory usage for large /ToUnicode streams
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
Metrics ssvc

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

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
Metrics cvssV3_1

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

cvssV3_1

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

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-1050
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate

Type Values Removed Values Added
Description pypdf is a free and open-source pure-python PDF library. Prior to 6.7.1, an attacker who uses this vulnerability can craft a PDF which leads to long runtimes and large memory consumption. This requires parsing the /ToUnicode entry of a font with unusually large values, for example during text extraction. This vulnerability is fixed in 6.7.1.
Title pypdf has possible long runtimes/large memory usage for large /ToUnicode streams
Weaknesses CWE-834
References
Metrics cvssV4_0

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

Weaknesses
  • CWE-1050

    Excessive Platform Resource Consumption within a Loop

  • CWE-834

    Excessive Iteration

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 24, 2026, 6:40 PM
Reserved
Feb 17, 2026, 3:08 AM
Status
Analyzed
Published
Feb 20, 2026, 10:16 PM
Modified
Nov 2, 2026, 4:06 PM
Severity
Moderate
Public date
Feb 20, 2026, 9:11 PM