Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft PDF with oversized Roman /St page label
-
DeliverySubmit PDF to pypdf-based application
-
ExploitApplication retrieves document page labels
-
ExecutionRoman numeral generator builds huge string
-
ImpactMemory exhaustion, application unavailable
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 target application to call pypdf's page-label retrieval on an attacker-supplied PDF whose /PageLabels /Nums entry declares a Roman-numeral style (/S /R) with an unusually large /St start value (the fix rejects values above 3,999). The flaw is remote/unauthenticated (AV:N/PR:N/UI:N) with no special product configuration needed, but the practical limiting factor is that the consuming application must actually invoke page-label parsing on untrusted PDFs; applications that never read page labels are unaffected. Affects pypdf versions prior to 6.17.0. |
| Impact | This is a genuine but bounded risk. The CWE-400 uncontrolled-resource-consumption flaw yields denial-of-service ONLY - the vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) correctly scores VC:N/VI:N/VA:H, meaning no confidentiality or integrity impact, purely availability. The headline 8.7 (CVSS 4.0 'High') is inflated relative to real-world urgency: CVSS 4.0 weights a network, no-auth, no-interaction availability hit heavily, but the equivalent CVSS 3.1 severity for a pure memory-exhaustion DoS is ~7.5. No EPSS score, no CISA KEV listing, and no standalone public exploit were provided, so there is no evidence of active or automated exploitation - treat this as a patch-in-normal-cycle issue rather than an emergency. One caveat: the fixing PR (#4047) ships reproducer test cases (e.g. /St=5000 with Roman style) that demonstrate the trigger, so a working trigger is effectively public even though no weaponized exploit is catalogued. The network attack vector is real but conditional: exploitation only occurs if the consuming application actually calls pypdf's page-label retrieval on the attacker's PDF, which is application-behavior-dependent, not attacker-controlled. |
| Exploit ScenarioDerived | An attacker uploads or submits a crafted PDF to a service that uses pypdf and reads document page labels (e.g. a document-processing pipeline, viewer, or metadata extractor). The PDF declares a Roman-numeral page-label style (/S /R) with an extremely large /St start value, causing pypdf's number-to-Roman conversion to build an enormous numeral string and consume large amounts of memory, degrading or crashing the service. No authenticated exploit is catalogued, but the fix PR includes reproducer tests that publicly demonstrate the trigger. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 30, 2026
Memory-exhaustion denial of service in pypdf versions prior to 6.17.0 allows remote attackers to inflate application memory usage by supplying a crafted PDF whose /PageLabels /Nums dictionary declares a Roman-numeral numbering style (/S /R) with an extremely large start value (/St), causing the library to construct a numeral string proportional to that value. The CVSS:4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N, VA:H) indicates an unauthenticated, network-reachable, low-complexity attack with high availability impact and no confidentiality or integrity effect, but the practical precondition is that the consuming application must actually invoke pypdf's page-label retrieval on attacker-supplied documents - applications that never read page labels are unaffected. No public exploit code has been identified at time of analysis and there is no CISA KEV entry; the vendor released a fix in 6.17.0 that rejects Roman start values above 3,999.
RemediationAI
Vendor-released patch: 6.17.0 - upgrade pypdf to 6.17.0 or later (pip install --upgrade 'pypdf>=6.17.0') and redeploy, since the fix rejects Roman-numeral start values above 3,999 and logs the malformed /Nums entry instead of allocating; see the advisory at https://github.com/py-pdf/pypdf/security/advisories/GHSA-qv6h-rv94-w285 and release notes at https://github.com/py-pdf/pypdf/releases/tag/6.17.0. If an immediate upgrade is not possible, the highest-value compensating control is to stop passing untrusted PDFs into page-label parsing: avoid calling the page-label retrieval APIs on user-supplied documents, or pre-sanitize documents by walking /PageLabels /Nums and rejecting/removing any label dictionary whose /S is /R (or /r) with an /St greater than 3,999 - the trade-off is that legitimate PDFs using very large Roman start values (rare, since standard Roman notation tops out at 3,999) will show fallback Arabic labels, and sanitization code must be maintained alongside the library. As a second layer, run untrusted-PDF parsing in a process with a hard memory ceiling and timeout (e.g. container memory limits, resource.setrlimit, or a subprocess worker) and catch MemoryError so exhaustion degrades a single request rather than the whole service; the trade-off is that the worker may be OOM-killed instead of failing gracefully, and aggressive caps can break processing of large legitimate documents. Restricting who can submit PDFs to the affected endpoint also reduces exposure but does not address the underlying defect and is not a substitute for the 6.17.0 upgrade.
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 reading/writing library, and the affected component is pypdf/_page_labels.py, which parses the PDF /PageLabels number tree. A /PageLabels entry may contain /Nums, an array of (start-index, label-dictionary) pairs; a label dictionary with /S /R requests Roman numerals and an optional /St integer sets the starting value from which labels are counted. Under CWE-400 (Uncontrolled Resource Consumption), the pre-6.17.0 implementation converted the supplied integer directly into a Roman-numeral string, so a large /St value (e.g. 5000 or higher) produced a disproportionately long string, allocating memory each time a label is generated. The upstream fix introduces MAXIMUM_ROMAN_NUMERAL = 3_999 - the largest value representable with standard symbols and subtractive notation, aligned with the AA-Turner/roman-numerals reference implementation - and raises ValueError('Number is out of range.') for anything larger; get_label_from_nums() catches TypeError/ValueError and logs 'Ignoring malformed page label entry in /Nums' rather than propagating the failure. The commit (89db7c4fe9315ecc964bfdf05a4e8c4b94175163, PR 4047) also refactors the numeral generator into a straightforward accumulation loop and switches to string.ascii_uppercase, and adds regression tests asserting the range limit for both uppercase Roman conversion and malformed /Nums handling. Affected installs are identified by CPE cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:*, i.e. all pypdf releases before 6.17.0 regardless of platform or Python version.
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:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Remote unauthenticated crafted PDF processed without interaction (AV:N/AC:L/PR:N/UI:N); pure memory-exhaustion DoS so C:N/I:N/A:H with no scope change.
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.17.0, a crafted PDF can provide unusually large Roman page-label values that cause pypdf/_page_labels.py to generate excessively large numeral strings when an application retrieves document page labels, consuming large amounts of memory and potentially making the application unavailable. This issue is fixed in version 6.17.0.
Technical POC Analysis
Bug class: uncontrolled resource consumption (CWE-400), with the advisory also tagging CWE-770 (allocation without limits or throttling).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
pypdf, an open-source PDF parsing library embedded in many document-ingestion, preview, and conversion pipelines, can be forced into memory exhaustion by a single crafted PDF that declares an absurd Roman-numeral page-label start value, letting an unauthenticated remote attacker slow or crash any service that reads page labels from untrusted uploads. This is a pure availability risk to customer-facing upload and batch-processing features, not a data-disclosure or integrity risk, so leadership should care primarily about service downtime, resource-cost spikes, and downstream SLA impact. Only applications that actually invoke pypdf's page-label retrieval on attacker-supplied documents are exposed; PDF workflows that never touch page labels are unaffected.
Apply vendor patch (upgrade to pypdf 6.17.0 or later); in the interim, disable page-label retrieval on untrusted documents, cap worker memory and request timeouts, and pre-screen or reject oversized and malformed PDFs before parsing.
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
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
EUVD-2026-90365
GHSA-qv6h-rv94-w285
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB