CVE-2026-57204

pypdf: Missing stream length values ignore defined limits

Published Jun 30, 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.13.3, a maliciously crafted PDF can cause DoS. An attacker who uses this vulnerability can craft a PDF which leads to large memory usage, as MAX_DECLARED_STREAM_LENGTH is sometimes ignored. This requires parsing a content stream without a /Length value. This issue has been fixed in version 6.13.3.

Analysis

AI-generated

Technical impact

The vulnerability allows a maliciously crafted PDF that omits the required /Length entry to bound a large amount of memory while parsing the stream, leading to memory exhaustion or a crash. This flaw is a denial of service vulnerability due to unbounded memory allocation (CWE‑770). The attack does not compromise confidentiality or integrity, but it can render the application or host unavailable.

Affected Systems

Any software that imports the py‑pdf:pypdf library and processes untrusted PDF documents—such as document viewers, converters, or web services handling user uploads—is affected if it uses a version earlier than 6.13.3.

Risk and Exploitability

The CVSS score of 6.9 indicates a serious risk. The EPSS score of less than 1% suggests that actual exploitation is currently rare, and the vulnerability is not listed in CISA’s KEV catalog. Because the attack requires only a crafted PDF and does not need elevated privileges, the potential impact can be high in environments that accept external files, making this a moderate–to–high risk for exposed systems.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade pypdf to version 6.13.3 or later to apply the proper /Length declaration before passing them to the library, rejecting any that lack the required entry
  • Apply application‑level resource limits or run PDF parsing in an isolated process with memory or timeouts to mitigate memory exhaustion risks
  • Monitor application logs for abnormal memory usage patterns indicative of attempted exploitation

Generated by OpenCVE AI on August 3, 2026 at 06:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
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
Weaknesses CWE-770
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
Metrics ssvc

{'options': {'Automatable': 'yes', '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
Description pypdf is a free and open-source pure-python PDF library. Prior to 6.13.3, a maliciously crafted PDF can cause DoS. An attacker who uses this vulnerability can craft a PDF which leads to large memory usage, as MAX_DECLARED_STREAM_LENGTH is sometimes ignored. This requires parsing a content stream without a /Length value. This issue has been fixed in version 6.13.3.
Title pypdf: Missing stream length values ignore defined limits
Weaknesses CWE-400
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-400

    Uncontrolled Resource Consumption

  • CWE-770

    Allocation of Resources Without Limits or Throttling

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 1, 2026, 2:29 PM
Reserved
Jun 24, 2026, 2:00 AM
Status
Analyzed
Published
Jun 30, 2026, 10:16 PM
Modified
Nov 2, 2026, 4:06 PM
Severity
Moderate
Public date
Jun 30, 2026, 9:59 PM