Skip to main content

pypdf CVE-2026-119205

| EUVDEUVD-2026-113377 HIGH
Loop with Unreachable Exit Condition (Infinite Loop) (CWE-835)
2026-10-29 GitHub_M GHSA-mfr5-77xh-9j7h
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
    Deliver crafted cyclic PDF to app
  2. Exploit
    Application clones/duplicates DictionaryObject
  3. Execution
    Source cycle evades visited-object check
  4. Impact
    Infinite loop exhausts CPU/memory

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 an application using pypdf prior to 6.21.4 perform a clone or duplicate operation on a DictionaryObject originating from an attacker-supplied PDF (e.g., PdfWriter.append/clone flows that duplicate dictionaries), and that PDF must contain a crafted cyclic DictionaryObject whose source cycle evades the destination-reference-based visited check. Limiting factors: the vulnerable code path is only reached when the host application actually clones/duplicates dictionaries from untrusted input (UI:P reflects that a user or application must process the malicious file); applications that only read without cloning, or that have upgraded to 6.21.4, are not affected. No authentication is required (PR:N), and the impact is confined to availability (process hang / resource exhaustion) with no data disclosure or modification.

Impact

This is a denial-of-service issue (CWE-835, uncontrolled infinite loop) in the pypdf library, and the available signals point to a real but moderate, non-emergency priority. The 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) indicates a network-reachable, low-complexity trigger with no privileges but a required passive user/application interaction (UI:P), and impact limited strictly to availability (VA:H) - there is no confidentiality or integrity exposure. The vuln.today decision label is 'this_week', not act_now or emergency, which is consistent with a DoS-only outcome. No CISA KEV listing is present and no EPSS score was provided, so there is no evidence of active exploitation or widespread automated weaponization; absence of those signals is not itself an error but means real-world exploitation pressure is currently unquantified. A public PoC reference exists in the form of the fix PR (#4288), which includes a cycle-detection test that constructs a crafted cyclic PDF; it is not verified as working standalone exploit code. The signals are internally consistent (no conflicts): network vector plus required processing of an attacker-supplied PDF, availability-only impact, and a 'this_week' priority all align with a resource-exhaustion bug in a parsing library rather than a code-execution or data-breach flaw.

Exploit ScenarioDerived

An attacker supplies a crafted PDF containing a cyclic DictionaryObject (cyclic indirect references) to an application built on pypdf prior to 6.21.4. When that application clones or duplicates the dictionary - for example via a write/append or clone operation - the flawed traversal checks generated destination references instead of the original source references, so the source cycle evades the visited-object check and the clone recurses forever, hanging the process and exhausting CPU. A public PoC reference (the fix PR's cycle-detection test) demonstrates the crafted-PDF trigger, though it is not verified as a packaged working exploit.

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

Cloning or duplicating a crafted cyclic DictionaryObject with pypdf before 6.21.4 can hang the calling process in an infinite loop, exhausting CPU and stalling the thread that parses the PDF. The defect is a bookkeeping error in the clone traversal: the visited-set is populated from the generated destination references instead of the original source references, so certain cycles in an attacker-supplied PDF slip past the cycle check. Applications are affected only if they clone or duplicate dictionaries from untrusted PDFs (for example PdfWriter.append-style flows); unauthenticated attackers can trigger it by supplying a malicious file that a victim or application processes (CVSS 4.0 7.1, assessed CVSS 3.1 7.1, availability-only impact). No confirmed public exploit code was identified at time of analysis, and the upstream fix PR includes a regression test with a minimal crafted PDF that reproduces the hang. Fix is released in pypdf 6.21.4; the vuln.today decision label is this_week, indicating a moderate, non-emergency priority.

RemediationAI

Vendor-released patch: pypdf 6.21.4 (pin pypdf>=6.21.4 in requirements or lockfiles and rebuild any vendored copies); confirm the installed version with pip show pypdf since transitive pins can silently hold older releases. If upgrading is not immediately possible, the vendor's stated workaround is to apply the changes from PR #4288 (https://github.com/py-pdf/pypdf/pull/4288) - capturing cur_obj.indirect_reference as source_reference and using its idnum/generation for the visited-set check and insertion - which carries the trade-off of maintaining an unsupported local fork or patch that must be reconciled and dropped at the next real upgrade. Exposure is also bounded by the code path itself: per the assessed conditions, only applications that clone or duplicate dictionaries from attacker-supplied PDFs reach the flaw, so avoiding or gating clone/append processing of untrusted files (or isolating that processing so a hang cannot stall the primary service) limits the availability impact until the upgrade lands. No vendor-released patch outside 6.21.4 was identified in the available data.

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 distributed on PyPI, and its generic layer models PDF objects such as DictionaryObject in pypdf/generic/_data_structures.py. Clone/duplicate operations must traverse object graphs, and because PDF indirect references can form cycles, the _clone routine keeps a visited set of (idnum, generation) pairs to terminate traversal. The root cause class is CWE-835 (Loop with Unreachable Exit Condition / uncontrolled infinite loop): the code captured the indirect reference of the freshly created clone rather than of the object currently being read from the source document. When the generated destination reference did not match the source-side cycle (or was still unset), the visited check never fired for that source node and traversal recursed forever. The upstream fix (PR #4288, commit f176db1a1f7f9af3e472e69a843ef1175653b044) adds a source_reference = cur_obj.indirect_reference capture and uses its idnum/generation for both the membership test and the visited-set insertion, so source-side cycles are detected. The accompanying regression test builds a six-object PDF whose streams reference each other via /N keys, wraps it in a strict five-second timeout, and asserts that a single page is appended. Impact is confined to availability (VC:N/VI:N/VA:H): there is no data disclosure or modification, and the trigger requires a clone/duplicate operation on untrusted content - applications that only read PDFs without cloning are outside the vulnerable path.

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

Network-reachable via a supplied PDF that the application must process and clone (UI:R), no auth (PR:N), low complexity, and availability-only impact (A:H) with 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:35 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 when cloning or duplicating a crafted cyclic DictionaryObject. Clone traversal checked generated destination references rather than the original source references, allowing some source cycles to evade the visited-object check. 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

Evidence base: GHSA-mfr5-77xh-9j7h only.

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

CVE-2026-119205 is a high-severity denial-of-service vulnerability in pypdf versions before 6.21.4 that can cause an infinite loop and CPU exhaustion when processing maliciously crafted PDFs. Applications that clone PDF dictionaries from untrusted sources-such as document upload or processing services-are at risk, potentially causing service outages and operational disruption.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 77% exploitable
Prevalence
High
very widely downloaded pure-Python PDF library embedded in many applications
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub VulDB

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
Yes
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-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-119203 HIGH POC
7.1 Oct 29

Denial of service in pypdf prior to 6.21.4 lets remote attackers hang a PDF-processing thread by supplying an incomplete

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