Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted PDF to service
-
ExploitApplication invokes page_labels property
-
ExecutionRepeated full /Nums rescans per page
-
ImpactCPU exhausted, worker stalls (DoS)
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 | The target application must use pypdf (< 6.21.3) AND specifically call the page_labels property on an attacker-controlled PDF. The malicious PDF must contain a flat /PageLabels number tree whose /Nums array holds many label ranges, so that per-page resolution repeatedly rescans the array (work scales with page_count × number_of_ranges). No authentication is required (PR:N). Limiting factors that reduce real-world exposure: exploitation is not triggered by mere parsing - the page_labels code path must be exercised (UI:P), the impact is confined to availability/CPU time with no confidentiality or integrity effect, and only versions prior to 6.21.3 are affected. |
| Impact | This is a genuine but moderate-priority availability issue, not a high-CVSS-but-illusory risk. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H) scores 7.1 and indicates a network-reachable, low-complexity, unauthenticated algorithmic-complexity flaw whose only impact is availability (VC:N/VI:N, VA:H) - consistent with the CWE-400 resource-exhaustion description. The decisive limiter is UI:P: exploitation is not automatic on parse; the application must specifically retrieve page labels (call the page_labels property) on the attacker-supplied PDF, so only services that exercise that code path are exposed. No EPSS score is provided in the input and the CVE is not listed in CISA KEV, so there is no quantitative exploitation-probability signal and no evidence of active exploitation. The vuln.today decision label is 'this_week' (not act_now/emergency), which aligns with a serviceable but non-emergency DoS. Net: patch within the week for any service that ingests untrusted PDFs and reads page labels; for deployments that never call page_labels the practical exposure is low. Missing data to note explicitly: no EPSS value supplied and SSVC automatable/technical-impact fields are not provided, so real-world exploitation frequency cannot be quantified from the input. |
| Exploit ScenarioDerived | An attacker submits a crafted PDF to an online service that uses pypdf (e.g. a document-ingestion, conversion, or metadata-extraction backend) and that retrieves page labels via the page_labels property. The PDF embeds a flat /PageLabels /Nums page-label number tree with many ranges; because each page is resolved independently and rescans the whole /Nums array from the start, runtime grows with page count times range count, consuming excessive CPU and stalling the worker. No verified working public exploit is identified; the fix PR #4251 includes tests that characterize the behavior but not a standalone weaponized exploit. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 29, 2026
pypdf before 6.21.3 can be driven into excessive CPU consumption when an application retrieves page labels from a specially crafted PDF whose flat /PageLabels number tree contains many label ranges. The impact is availability-only: the assessed CVSS 3.1 vector is AV:N/AC:L/PR:N/UI:R with high availability impact and no confidentiality or integrity effect, and the vulnerable page_labels property must actually be invoked on attacker-controlled input. Vendor-released patch: 6.21.3; no public exploit identified at time of analysis.
RemediationAI
Upgrade to pypdf 6.21.3 or later; the vendor-released patch is version 6.21.3. If upgrading is not immediately possible, the vendor workaround is to apply the changes from PR #4251. Because the vulnerable behavior is only reachable when an application retrieves page labels from attacker-controlled PDFs, restricting page_labels processing to trusted documents can reduce exposure as a temporary compensating measure, but it is not the complete vendor fix. Consult the advisory at https://github.com/py-pdf/pypdf/security/advisories/GHSA-42gh-23hr-vphw, PR https://github.com/py-pdf/pypdf/pull/4251, and release https://github.com/py-pdf/pypdf/releases/tag/6.21.3.
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 parsing library, and PDF page labels are stored in a /PageLabels number tree whose /Nums array contains integer keys paired with label dictionaries. In versions prior to 6.21.3, the page_labels property resolves each page independently by calling the per-page label routine for every page index, and each resolution repeatedly scans the same /Nums array from the beginning. A flat /Nums array with many ranges therefore makes the work scale with both the page count and the number of label ranges, which is CWE-400 uncontrolled resource consumption. The fix introduces an index2labels single-pass path for flat arrays whose keys are increasing NumberObjects and whose values are direct objects, while falling back to the previous page-by-page behavior for other or malformed number trees. The independent assessment rates this CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H, confirming availability-only impact and requiring user interaction through the application exercising page_labels.
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
Network-delivered crafted PDF, no privileges or auth (PR:N), but the app must actively retrieve page labels so UI:R; algorithmic complexity yields availability-only impact (A:H), scope unchanged.
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 take excessive time to retrieve page labels from a crafted PDF containing a flat page-label number tree with many ranges. The page_labels property resolves each page independently and repeatedly scans the same /Nums array from the beginning, causing work to grow with both the page count and the number of label ranges. 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
CWE-400 (Uncontrolled Resource Consumption), algorithmic complexity variant.
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
A high-severity vulnerability in pypdf versions before 6.21.3 allows attackers to cause excessive CPU consumption by supplying a crafted PDF with numerous page label ranges when an application processes page labels. This could disrupt document processing workflows and cause service slowdowns, impacting business operations that rely on automated PDF handling.
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
Denial of service in pypdf before 6.21.3: retrieving the page count (for example via len(reader.pages) or get_num_pages(
Memory exhaustion in the pypdf PDF library before 6.21.3 allows a small, deliberately malformed PDF dictionary to blow u
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-113378
GHSA-42gh-23hr-vphw
NVD
CVE.org
EPSS
Exploit-DB