Skip to main content

pypdf CVE-2026-48156

| EUVDEUVD-2026-32913 MEDIUM
Excessive Iteration (CWE-834)
2026-05-28 GitHub_M GHSA-248m-82v9-q6g6
5.1
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft PDF with /W [0 0 0] and large /Size in XRef stream
  2. Delivery
    Submit crafted PDF to pypdf-based application
  3. Exploit
    pypdf parses cross-reference stream without early-exit check
  4. Execution
    Excessive iteration over zero-byte entries begins
  5. Persist
    Worker process hangs or runs slowly
  6. Impact
    Service availability degraded

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Excessive iteration
Exploitation Conditions

The target application must use pypdf < 6.12.0 to parse a PDF file controlled by the attacker. The CVSS vector PR:N/UI:N indicates no authentication and no user interaction are required beyond the application's normal file-processing workflow. The specific triggering condition is a PDF containing a cross-reference stream where the /W array sums to zero (e.g., /W [0 0 0]) combined with a large /Size value. No non-default configuration of pypdf is required; the vulnerability exists in the default (non-strict) parsing mode. Exploitation is limited to availability impact (long runtimes) and does not achieve code execution or data disclosure. Applications that do not process untrusted or externally supplied PDF files are not exposed.

Impact

The CVSS 4.0 base score is 5.1 (Medium) with vector AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N. The local attack vector (AV:L) reflects that exploitation requires the attacker to supply a file that is processed on the system rather than attacking a bound network socket; however, this rating understates real-world risk for web applications that accept PDF uploads, where the equivalent network delivery path exists. The VA:L (Low availability on the vulnerable system) score is consistent with degraded performance or hanging rather than a full crash. No EPSS score was provided in the intelligence data. There is no KEV listing and no public proof-of-concept identified. Notably, the ENISA EUVD tags label this 'Information Disclosure,' which directly conflicts with the description and CVSS impact metrics (VC:N/VI:N), and with CWE-834; this tag appears to be a mislabeling and should not factor into risk decisions. Real-world priority should be moderate for any service processing untrusted PDFs at scale, where sustained high-volume submission could exhaust worker processes.

Exploit ScenarioDerived

An attacker crafts a minimal PDF containing a cross-reference stream with /W [0 0 0] and a /Size set to a very large integer (e.g., 50,000,000 as demonstrated in the updated test suite). The attacker submits this file to any service or script that calls pypdf to parse or inspect PDF content - such as a document conversion API, a web form that accepts PDF uploads, or a CI pipeline that processes PDF artifacts. The pypdf parser enters an excessive iteration loop attempting to read the declared number of zero-byte XRef entries, causing the processing thread or worker to hang for an extended period, degrading or denying service.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 28, 2026

Denial-of-service via algorithmic complexity in pypdf before 6.12.0 allows an attacker who can supply a crafted PDF file to cause excessive processing time during cross-reference stream parsing. The vulnerability is triggered by crafting a PDF with /W [0 0 0] field values in a cross-reference stream combined with a large /Size value, which causes the library to perform unbounded iteration over zero-byte entries. No public exploit code has been identified at time of analysis, and this vulnerability is not listed in the CISA KEV catalog; however, any application that processes untrusted PDF input using pypdf is exposed.

RemediationAI

Vendor-released patch: pypdf 6.12.0. Upgrade immediately by running 'pip install --upgrade pypdf>=6.12.0'. The fix is confirmed in the GitHub release at https://github.com/py-pdf/pypdf/releases/tag/6.12.0 and the underlying code change is visible in PR #3791 at https://github.com/py-pdf/pypdf/pull/3791. For deployments that cannot upgrade immediately, a compensating control is to wrap PDF parsing calls in a timeout using Python's signal.alarm or a subprocess with a hard wall-clock limit, and reject any PDF that exceeds it; this trades off latency predictability for protection. Alternatively, pre-screening PDFs with a separate validator before passing them to pypdf reduces exposure. Both workarounds introduce operational complexity and should be treated as temporary.

Affected VersionsENISA

pypdf < 6.12.0

Affected Packages

pypi pypdf fix: 6.12.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

pypdf is a pure-Python PDF library (CPE: cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:*) that implements PDF 1.5+ cross-reference streams. Cross-reference streams use a /W array to specify the byte widths of the three fields per entry (type, offset, generation). When all three width values are zero (/W [0 0 0]), each entry consumes zero bytes; a parser that attempts to iterate over all entries declared by /Size will loop effectively indefinitely. This maps directly to CWE-834 (Excessive Iteration). The vulnerable logic was in _sanitize_pdf15_xref_stream_index_pairs inside _reader.py, where the previous guard used max(sum(W), 1) to prevent a ZeroDivisionError but did not short-circuit before attempting the full iteration. The fix in PR #3791 adds an early-exit when min_entry_bytes == 0, returning an empty list (non-strict mode) or raising PdfStreamError (strict mode).

Know when Pypdf gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 5.1 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
SUSE 3.3 LOW
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
Red Hat 3.3 LOW

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Patch available
May 28, 2026 - 17:01 EUVD
CVSS changed
May 28, 2026 - 16:22 NVD
5.1 (MEDIUM)
CVE Published
May 28, 2026 - 14:50 nvd
UNKNOWN (no severity yet)

DescriptionCVE.org

pypdf is a free and open-source pure-python PDF library. Prior to 6.12.0, an attacker who uses this vulnerability can craft a PDF which leads to long runtimes. This requires cross-reference streams with /W [0 0 0] values and large /Size values. This vulnerability is fixed in 6.12.0.

Threat Intelligence Overview

EPSS Score
0.0%
Top 98% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Pypdf

View all
CVE-2026-84309 MEDIUM POC
6.9 Sep 01

Infinite loop denial of service in pypdf prior to 6.16.0 allows any attacker who can supply a crafted PDF to a pypdf-bas

CVE-2026-54651 MEDIUM POC
6.9 Jun 22

Infinite loop denial-of-service in pypdf prior to 6.13.1 allows an attacker to hang any process that merges a crafted PD

CVE-2023-36810 MEDIUM POC
6.5 Jun 30

pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. Rat

CVE-2023-36807 MEDIUM POC
6.5 Jun 30

pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. Rat

CVE-2023-36464 MEDIUM POC
5.5 Jun 27

pypdf is an open source, pure-python PDF library. Rated medium severity (CVSS 5.5), this vulnerability is no authenticat

CVE-2026-84310 MEDIUM POC
4.8 Sep 01

Resource exhaustion in pypdf prior to 6.16.1 allows an attacker who can supply a crafted PDF to cause denial of service

CVE-2026-103000 HIGH
8.7 Sep 30

Memory exhaustion in pypdf versions prior to 6.19.0 allows a remote, unauthenticated attacker to make an application una

CVE-2026-102999 HIGH
8.7 Sep 30

Denial of service in pypdf versions prior to 6.19.0 allows an unauthenticated remote attacker to pin a PDF-processing wo

CVE-2026-102998 HIGH
8.7 Sep 30

Denial of service in pypdf versions prior to 6.19.0 allows remote, unauthenticated attackers to exhaust application CPU

CVE-2026-102997 HIGH
8.7 Sep 30

Denial of service in pypdf before 6.18.1 lets a crafted PDF drive the library's FlateDecode recovery path into inefficie

CVE-2026-102996 HIGH
8.7 Sep 30

Memory exhaustion in pypdf versions prior to 6.18.1 lets a crafted PDF force the library to allocate and process far mor

CVE-2026-102995 HIGH
8.7 Sep 30

Memory exhaustion in pypdf versions prior to 6.18.1 allows unauthenticated remote attackers to crash or degrade any appl

Vendor StatusVendor

SUSE

Severity: Low

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy