Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDeliver crafted encrypted PDF to app
-
DeliveryApp decrypts document
-
ExploitApplication reads page count
-
Executionpypdf trusts forged /Count
-
PersistExcessive CPU/memory consumption
-
ImpactService degradation or denial of service
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
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 the application to access the page count (e.g. get_num_pages() or len(reader.pages)) of an attacker-supplied PDF that is encrypted but has been successfully decrypted (an empty-password encrypted file suffices, as shown in the upstream test), where the page tree's /Count value has been forged to a large number. The pre-fix get_num_pages path used the declared file page count for encrypted documents instead of walking the page tree, so the attacker-controlled /Count drives the excessive work. Limiting factors: the victim application must ingest and process an untrusted PDF and must trigger page-count retrieval (UI:P / passive user interaction), and the document must be decryptable by the application; impact is limited to availability (resource exhaustion) with no confidentiality or integrity consequence. Services that never call page-count on untrusted encrypted PDFs are not exposed. |
| Impact | This is a moderate-severity denial-of-service issue, not a high-priority emergency. The only supplied severity signal is a CVSS 4.0 vector (7.1) with AV:N/AC:L/AT:N/PR:N/UI:P and impact confined to availability (VA:H; VC:N/VI:N/VA:H, no confidentiality or integrity impact and no scope change). No EPSS score and no CISA KEV status were provided, so there is no evidence of exploitation probability or active abuse; absence of these is not itself a risk indicator. The vuln.today decision label is 'this_week', which aligns with a patch-available resource-exhaustion bug that is network-reachable but requires a victim to process an attacker-supplied file (UI:P). The network vector (AV:N) reflects that the malicious PDF can be delivered remotely, but exploitation still depends on the application actually invoking page-count retrieval on a decrypted crafted document, so real-world impact is bounded by how the hosting application ingests untrusted PDFs. Overall: a genuine availability concern for services that parse untrusted encrypted PDFs with pypdf, but lower urgency than an unauthenticated RCE or an actively exploited flaw. |
| Exploit ScenarioDerived | An attacker submits a crafted encrypted PDF (openable with an empty or known password) whose page tree declares a forged /Count value to a service that uses pypdf to count pages of uploaded documents. When the application decrypts the file and reads its page count, pypdf trusts the inflated declared count and performs excessive work and memory allocation, degrading or exhausting the worker. A public PoC reference exists in the upstream pull request as a regression test demonstrating the forged /Count behavior; it is not verified as working weaponized exploit code. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 29, 2026
Denial of service in pypdf before 6.21.3: retrieving the page count (for example via len(reader.pages) or get_num_pages()) of a crafted encrypted PDF can consume excessive CPU time and memory. The flaw only manifests after the document has been decrypted - an empty-password encrypted file is enough, as demonstrated by the upstream regression test - because the pre-fix code trusted the page tree's attacker-controlled /Count value instead of walking the tree, so a forged large count drives the workload. Impact is limited to availability (C:N/I:N/A:H) and the victim application must both ingest an untrusted PDF and trigger page-count retrieval, which is why the independent assessment rates this a moderate-severity availability issue rather than an emergency; no public exploit code has been identified at time of analysis, and the vendor fix is version 6.21.3.
RemediationAI
Vendor-released patch: upgrade to pypdf 6.21.3 or later (pip install --upgrade pypdf>=6.21.3), as stated in the GitHub advisory GHSA-62m5-6wh8-28x7 and the 6.21.3 release notes at https://github.com/py-pdf/pypdf/releases/tag/6.21.3. If upgrading is not immediately possible, the vendor's documented workaround is to backport the changes from PR #4270 (https://github.com/py-pdf/pypdf/pull/4270, commit 82b91951dc74496bb3efe6465434f041bb6a5e6b), which limits the declared /Count shortcut to documents that are still encrypted and not yet decrypted; carrying a local patch means maintaining a fork until the upgrade happens. Services that never call page-count retrieval (get_num_pages() or len(reader.pages)) on untrusted encrypted PDFs are not exposed, so until patched you can reduce exposure by deferring or skipping page-count queries on such files and by not decrypting untrusted documents solely to count pages - a trade-off that removes the affected code path at the cost of page-count functionality for encrypted inputs.
Affected VersionsENISA
Affected Packages
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 used by many Python applications and services to read, split, merge and inspect PDF files. A PDF's pages are described by a page tree whose root /Pages dictionary carries a /Count value; pypdf's get_num_pages() historically took a shortcut for encrypted documents, where the page tree cannot be walked before decryption, and returned the file's declared page count. After a document was successfully decrypted the same shortcut remained in place, so a /Count value that does not match the real number of page objects was still trusted. By declaring an arbitrarily large /Count inside an encrypted file that the application can decrypt, an attacker makes the retrieval path perform excessive work and allocate excessive memory. The root cause class is CWE-400 (Uncontrolled Resource Consumption) - the security decision depends on an unvalidated numeric field rather than on the actual structure of the document. The upstream fix (PR #4270) restricts the declared-count shortcut to documents that are still encrypted and not yet decrypted, and otherwise falls back to the flattened page tree walk; the accompanying test encrypts a one-page document whose /Count is forged to 42 and asserts that len(reader.pages) is 1 after decryption.
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
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
Malicious PDF is network-deliverable (AV:N) and requires no auth (PR:N), but a victim must process the file and access its page count (UI:R); impact is availability-only (C:N/I:N/A:H).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
pypdf is a free and open-source pure-python PDF library. Prior to 6.21.3, pypdf can consume excessive time and memory when an application accesses the page count of a crafted encrypted PDF whose page tree declares a forged /Count value. Even after successful decryption, page-count retrieval trusts the unvalidated declared count instead of walking the page tree, allowing the attacker-controlled value to drive excessive work and memory use. This issue is fixed in version 6.21.3.
Blast Radius
ecosystem impact- 1 pypi packages depend on pypdf (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 6.21.3.
Technical POC Analysis
The vulnerability is CWE-400 (Uncontrolled Resource Consumption) in pypdf's page-count retrieval path.
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
CVE-2026-119208 is a high-severity availability vulnerability in pypdf versions before 6.21.3 that affects any application processing untrusted PDF files and retrieving page counts. An attacker can supply a crafted encrypted PDF that, once decrypted, consumes excessive CPU and memory, causing denial of service for the affected service. Leadership should prioritize this due to the potential for service disruption in document-handling workflows, particularly in customer-facing or automated processing systems.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Memory exhaustion while parsing crafted PDFs in pypdf versions prior to 6.21.3 allows an attacker to drive a consuming p
Memory exhaustion in the pypdf PDF library before 6.21.3 allows a small, deliberately malformed PDF dictionary to blow u
pypdf before 6.21.3 can be driven into excessive CPU consumption when an application retrieves page labels from a specia
Cloning or duplicating a crafted cyclic DictionaryObject with pypdf before 6.21.4 can hang the calling process in an inf
Parsing a crafted PDF with pypdf before 6.21.4 can drive disproportionate memory consumption when the library enumerates
Denial of service in pypdf prior to 6.21.4 lets remote attackers hang a PDF-processing thread by supplying an incomplete
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
Infinite loop denial-of-service in pypdf prior to 6.13.1 allows an attacker to hang any process that merges a crafted PD
pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. Rat
pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. Rat
pypdf is an open source, pure-python PDF library. Rated medium severity (CVSS 5.5), this vulnerability is no authenticat
Resource exhaustion in pypdf prior to 6.16.1 allows an attacker who can supply a crafted PDF to cause denial of service
EUVD-2026-113380
GHSA-62m5-6wh8-28x7
NVD
CVE.org
EPSS
Exploit-DB