CVE-2026-27888

pypdf: Manipulated FlateDecode XFA streams can exhaust RAM

Published Feb 26, 2026 CVSS 4.0 · 6.6 Medium EPSS < 1% KEV · Not listed
Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.7.3, an attacker who uses this vulnerability can craft a PDF which leads to the RAM being exhausted. This requires accessing the `xfa` property of a reader or writer and the corresponding stream being compressed using `/FlateDecode`. This has been fixed in pypdf 6.7.3. As a workaround, apply the patch manually.

Analysis

AI-generated

Technical impact

An attacker can craft a PDF that, when processed by a program using the pypdf library, causes the library to allocate an unusually large amount of memory by exploiting the handling of an XFA stream compressed with /FlateDecode. The flaw is triggered when the code accesses the xfa property of a Reader or Writer, leading to a memory‑management error (CWE‑1050) and a resource‑exhaustion vulnerability (CWE‑400). The result is exhaustion of RAM, a process crash, and a denial of service; there is no evidence of arbitrary code execution or data leakage.

Affected Systems

All releases of the pypdf library older than version 6.7.3 are vulnerable. The project is py‑pdf:pypdf, and the fix was introduced in release 6.7.3. Any deployment that imports and uses pypdf before that version and accesses the xfa property on PDFs is affected.

Risk and Exploitability

The CVSS base score of 6.6 indicates a moderate level of severity, and the EPSS score of less than 1 % denotes a low likelihood of this exploit appearing in the wild. The vulnerability is not listed in the CISA KEV catalog. A flaw is exercised when malicious PDF content is loaded and the xfa property is accessed, which is a typical path for document parsing or form‑processing applications that use pypdf. Consequently, an attacker who can supply such a PDF to a vulnerable application may cause a denial of service through memory exhaustion.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade pypdf to version 6.7.3 or later to obtain the official fix.
  • If an upgrade is not immediately feasible, apply the manual patch from commit 7a4c8246ed48d9d328fb596942271da47b6d109c to correct FlateDecode handling in XFA streams.
  • Adjust application logic to avoid accessing the xfa property on untrusted PDFs, and implement input validation or resource‑usage limits to detect abnormal memory consumption.

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

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-x7hp-r3qg-r3cj pypdf: Manipulated FlateDecode XFA streams can exhaust RAM
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': 'yes', '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': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/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
Description pypdf is a free and open-source pure-python PDF library. Prior to 6.7.3, an attacker who uses this vulnerability can craft a PDF which leads to the RAM being exhausted. This requires accessing the `xfa` property of a reader or writer and the corresponding stream being compressed using `/FlateDecode`. This has been fixed in pypdf 6.7.3. As a workaround, apply the patch manually.
Title pypdf: Manipulated FlateDecode XFA streams can exhaust RAM
Weaknesses CWE-400
References
Metrics cvssV4_0

{'score': 6.6, '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/E:U'}

Weaknesses
  • CWE-1050

    Excessive Platform Resource Consumption within a Loop

  • CWE-400

    Uncontrolled Resource Consumption

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 23, 2026, 3:49 PM
Reserved
Feb 24, 2026, 3:19 PM
Status
Analyzed
Published
Feb 26, 2026, 1:16 AM
Modified
Nov 2, 2026, 4:06 PM
Severity
Moderate
Public date
Feb 26, 2026, 12:42 AM