Skip to main content

pypdf CVE-2026-119203

| EUVDEUVD-2026-113374 HIGH
Loop with Unreachable Exit Condition (Infinite Loop) (CWE-835)
2026-10-29 GitHub_M GHSA-5849-834g-hvw5
7.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 truncated PDF with xref table and no trailer
  2. Delivery
    Deliver to service parsing untrusted PDFs
  3. Exploit
    Application calls pypdf PdfReader to open file
  4. Execution
    Trailer search rewinds repeatedly to same position
  5. Impact
    Processing thread loops indefinitely (denial of service)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Loop termination conditions
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target application open and parse an attacker-supplied PDF using pypdf prior to 6.21.4, and specifically a crafted INCOMPLETE PDF whose standard cross-reference (xref) table reaches end-of-file WITHOUT a trailer - this is the exact condition under which the trailer search rewinds to the same stream position and never terminates. The limiting factor is passive interaction (UI:P): the attacker needs the file to be ingested by pypdf (e.g. an upload/document-processing path), but no authentication, no special privileges, and no non-default configuration are required - pypdf's default parsing path is affected. Impact is confined to availability (a hung processing thread) on the system doing the parsing; there is no confidentiality or integrity effect.

Impact

This is a denial-of-service vulnerability (CWE-835, uncontrolled infinite loop) in the pypdf library, not a code-execution or data-exposure flaw. The vendor-supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N, score 7.1) is internally consistent with the description: availability-only impact (VA:H, with VC:N/VI:N), low complexity, no privileges, but passive user/application interaction (UI:P) is required because the attacker cannot trigger the loop until a crafted incomplete PDF is actually opened by pypdf. No EPSS score and no KEV status were provided in the input, and the vulnerability is not listed in CISA KEV, so there is no signal of active exploitation; exploitation status is 'no public exploit identified at time of analysis', though the upstream fix includes a minimal crafted-PDF regression test that reliably reproduces the hang. No SSVC exploitation/automatable/technical-impact decision values were supplied; the only priority signal is the vuln.today 'this_week' label, consistent with a patchable availability bug rather than an emergency. Realistically this is a moderate-priority issue: trivially triggerable where untrusted PDFs are parsed server-side (e.g. document-processing pipelines), but the worst outcome is a stuck processing thread, not compromise. The ceiling is bounded by impact being availability-only on the processing system.

Exploit ScenarioDerived

An attacker submits a specially crafted, truncated PDF whose standard cross-reference table reaches end-of-file without a trailer to a service that parses uploaded documents with pypdf (< 6.21.4). When pypdf opens the file, the trailer search rewinds to the same stream position without making progress and loops indefinitely, pinning the thread handling that request. No working weaponized exploit is published, but the fix's regression test (b"%PDF-1.4\nstartxref\n28\n%%EOF\nxref\n1 0\naaa") is a minimal trigger that demonstrates the hang.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 PoC candidate (unverified) Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Oct 29, 2026

Denial of service in pypdf prior to 6.21.4 lets remote attackers hang a PDF-processing thread by supplying an incomplete PDF whose standard cross-reference table runs to end-of-file without a trailer; the trailer search rewinds to the same stream position indefinitely instead of terminating, and the affected code is pypdf's default parsing path rather than an optional configuration. No authentication or privileges are required, only that the target application ingests the attacker-supplied file (passive user interaction), and impact is limited to availability - a single stuck worker thread with no confidentiality or integrity effect. The flaw is fixed in 6.21.4; no public exploit code and no confirmed active exploitation were identified at time of analysis.

RemediationAI

Vendor-released patch: upgrade to pypdf 6.21.4 (pip install 'pypdf>=6.21.4'), the version in which the repeated-position check is present, as documented in advisory GHSA-5849-834g-hvw5 and release tag 6.21.4. If an upgrade cannot be scheduled immediately, the vendor's stated workaround is to apply the changes from PR #4289 (https://github.com/py-pdf/pypdf/pull/4289), which adds the previous_position tracking in _read_standard_xref_table and raises PdfReadError when the parser rewinds to an already-seen offset; note that this is a source-level backport the vendor points to rather than a tagged release, so the patched code must be maintained in your own fork or vendored copy. Rollout should prioritize internet-facing document ingestion paths, where an unauthenticated party can supply the crafted file and block a processing thread.

Affected VersionsENISA

pypdf < 6.21.4

Affected Packages

pypi pypdf fix: 6.21.4

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, and the flaw lives in the standard (non-stream) cross-reference table reader in pypdf/_reader.py. When a PDF lacks a usable trailer, the parser scans for the b"trailer" tag; on failing to find it, the code rewinds the stream by seven bytes (stream.seek(-7, 1)) to pick up further xref sections. On a malformed, truncated file where the xref table reaches EOF without a trailer, that rewind returns the parser to a position it has already visited, so parsing makes no forward progress and the loop never terminates - the CWE-835 (Loop with Unreachable Exit Condition) class. The upstream fix (PR #4289, commit 06593f993789a4b573dd955730c1a7051128bb2a) records the position after each rewind in a previous_position variable and raises PdfReadError when the position repeats, e.g. "Xref parsing stuck at position 33: b'aaa'", converting an unbounded hang into a clean parse failure. The trigger is specifically an incomplete standard xref table without a trailer; the sources do not describe behavior for xref streams, encrypted documents, or other parser paths, and those are unverified. The CVSS 4.0 vector rates availability High with passive user interaction (UI:P) and no privileges (PR:N); the independent assessment maps this to CVSS 3.1 AV:N/AC:L/PR:N/UI:R with A:H and no C/I impact.

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 7.1 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 6.5 MEDIUM

Remote crafted PDF, low complexity, no privileges, but requires the victim application to open the file (UI:R); impact is availability-only (A:H), no confidentiality or integrity effect.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 5.5 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

2
Patch available
Oct 29, 2026 - 21:03 EUVD
CVE Published
Oct 29, 2026 - 20:30 cve.org
HIGH 7.1

DescriptionCVE.org

pypdf is a free and open-source pure-python PDF library. Prior to 6.21.4, pypdf can enter an infinite loop while opening a crafted incomplete PDF whose standard cross-reference table reaches the end of the file without a trailer. The trailer search can repeatedly rewind to the same stream position instead of terminating when parsing makes no progress, blocking the processing thread. This issue is fixed in version 6.21.4.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 547 pypi packages depend on pypdf (282 direct, 269 indirect)

Ecosystem-wide dependent count for version 6.21.4.

Technical POC Analysis

CWE-835: Loop with Unreachable Exit Condition ("Infinite Loop").

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Latest POC

1 PoC candidate from github (unverified)

Sign in to open the public PoC links collected for this CVE.

Executive ViewAI

Why It Matters

A high-severity denial-of-service vulnerability in the pypdf library (versions prior to 6.21.4) enables remote attackers to indefinitely hang PDF-processing threads by supplying a malformed PDF. This affects any application that ingests untrusted PDFs using the default parsing path, potentially causing service disruptions and resource exhaustion. Leadership should prioritize remediation to maintain availability of document-processing workflows.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis; interim mitigations include restricting ingestion of untrusted PDFs, implementing timeouts and resource limits on PDF-processing threads, and isolating PDF processing in sandboxed environments to prevent thread hangs from impacting critical services.

Threat Intelligence Overview

EPSS Score
0.3%
Top 77% exploitable
Prevalence
High
pypdf is one of the most widely used pure-Python PDF libraries, very high PyPI usage
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL 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 HIGH
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

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

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Pypdf

View all
CVE-2026-119209 HIGH POC
7.1 Oct 29

Memory exhaustion while parsing crafted PDFs in pypdf versions prior to 6.21.3 allows an attacker to drive a consuming p

CVE-2026-119208 HIGH POC
7.1 Oct 29

Denial of service in pypdf before 6.21.3: retrieving the page count (for example via len(reader.pages) or get_num_pages(

CVE-2026-119207 HIGH POC
7.1 Oct 29

Memory exhaustion in the pypdf PDF library before 6.21.3 allows a small, deliberately malformed PDF dictionary to blow u

CVE-2026-119206 HIGH POC
7.1 Oct 29

pypdf before 6.21.3 can be driven into excessive CPU consumption when an application retrieves page labels from a specia

CVE-2026-119205 HIGH POC
7.1 Oct 29

Cloning or duplicating a crafted cyclic DictionaryObject with pypdf before 6.21.4 can hang the calling process in an inf

CVE-2026-119204 HIGH POC
7.1 Oct 29

Parsing a crafted PDF with pypdf before 6.21.4 can drive disproportionate memory consumption when the library enumerates

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

Vendor StatusVendor

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