Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft PDF with padded malformed FlateDecode stream
-
DeliverySubmit to pypdf-backed service
-
ExploitTrigger byte-by-byte recovery loop
-
ExecutionRecovery counter fails to advance
-
ImpactCPU/time 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 an application using pypdf prior to 6.18.1 that parses or extracts content from attacker-controlled PDF files, and the attacker must supply a PDF containing a partially malformed /FlateDecode stream with padded data that forces the inefficient byte-by-byte decompression recovery path (the residual case left after the prior malformed-FlateDecode recovery fix). No authentication or user interaction beyond getting the file processed is needed. The practical limiting factor is that the target must actually invoke pypdf's decompression on the file (e.g., text extraction / stream reading); deployments pinned to 6.18.1+ or not processing untrusted PDFs are not affected. |
| Impact | This is a genuine but bounded availability-only risk. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H) is internally consistent with the description: no confidentiality or integrity impact, only availability (VA:H) via CPU/time exhaustion during decompression. The headline 8.7 ('High') reflects trivial, unauthenticated, network-reachable triggering - appropriate for a widely embedded library - but it must not be read as a code-execution or data-exposure flaw; the real-world consequence is a hung/unavailable process. EPSS is not provided, there is no CISA KEV listing, and no public exploit was identified at time of analysis, so this is 'no public exploit identified' rather than active exploitation - though the fixing PR ships a reproducer test (test_decompress__fallback__speed, formerly ~28-33s), meaning a working trigger is effectively public in the patch. Note this is explicitly a RESIDUAL issue after an earlier malformed-FlateDecode recovery fix, so environments that only partially updated may remain exposed. Priority is moderate: high exploitability and broad deployment, but capped severity because impact is DoS only. |
| Exploit ScenarioDerived | An attacker submits a crafted PDF with a partially malformed /FlateDecode stream padded so pypdf's recovery path decodes byte-by-byte while the recovery counter fails to advance on successfully-decoded bytes. When the victim application (e.g., an upload processor, document pipeline, or text-extraction service) calls pypdf on the file, decompression runs for a very long time, hanging the worker and denying service. The fixing PR includes a timing-based reproducer, so a reliable trigger is effectively public. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 30, 2026
Denial of service in pypdf before 6.18.1 lets a crafted PDF drive the library's FlateDecode recovery path into inefficient byte-by-byte decompression, consuming CPU until the consuming application becomes unavailable. Exploitation is unauthenticated and requires only that a pypdf-based service parse or extract text from an attacker-supplied PDF (CVSS v4.0 8.7, AV:N/AC:L/PR:N/UI:N, availability-only); no public exploit identified at time of analysis. The flaw is a residual case left after the earlier malformed-FlateDecode recovery fix and is resolved in 6.18.1.
RemediationAI
Vendor-released patch: upgrade to pypdf 6.18.1 (https://github.com/py-pdf/pypdf/releases/tag/6.18.1), which is the release that contains the fix described in advisory GHSA-jw7q-gvrg-4vj3 and implemented by PR #4073 / commit d9d38cf99b115deb562d3b68f36c33027bc04f79. If immediate upgrade is not possible, compensating controls include running PDF parsing in a separate worker process with a hard wall-clock timeout and killing/restarting it on expiry (trade-off: legitimate large or highly compressed PDFs may be terminated early and you must tune the timeout), capping the size of accepted uploads and rejecting oversized or unusually padded stream objects at the ingress layer (trade-off: may block legitimate large documents), queueing/rate-limiting extraction requests so a single slow document cannot starve the service, and isolating the parser in a low-CPU-quota sandbox or container (trade-off: adds operational complexity and can mask ongoing abuse). Lowering configuration.zlib_maximum_recovery_input_length can shorten the worst-case path but risks raising LimitReachedError on valid, mildly malformed PDFs that previously parsed successfully, so treat it as a stopgap only. Note that no vendor workaround other than upgrading is documented, and the fix specifically guards against the padded, partially-malformed FlateDecode case that the earlier recovery counter missed.
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
The vulnerability is an instance of CWE-400 (Uncontrolled Resource Consumption) in pypdf's filter layer. PDF content streams are commonly compressed with the /FlateDecode filter, which pypdf handles in pypdf/filters.py:decompress(); when a stream is malformed, the function falls back to a recovery loop that decompresses the remaining data incrementally, bounded by the configuration value zlib_maximum_recovery_input_length. In the vulnerable code the bound was tested with 'if index > ...' only after appending output, and the recovery counter did not advance for bytes that decoded successfully - so a partially malformed stream padded with extra data could keep the loop spinning in byte-by-byte decompression without ever tripping the limit. The pre-fix code also accumulated output with 'result_str += decompressed', an O(n^2) byte-concatenation pattern that magnifies runtime on large streams. The upstream fix (PR #4073, commit d9d38cf99b115deb562d3b68f36c33027bc04f79) switches accumulation to a bytearray, moves the limit check to 'if index >= configuration.zlib_maximum_recovery_input_length' before attempting decompression, and adds a regression test (test_decompress__fallback__speed) wrapped in pytest.mark.timeout(10) that notes the same case previously took roughly 28-33 seconds for a 1 MB incompressible stream. Because the flaw is a resource-exhaustion condition rather than memory corruption, the impact is limited to availability (VC:N/VI:N/VA:H); integrity and confidentiality are unaffected.
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
Untrusted PDF processed with no auth or interaction gives AV:N/AC:L/PR:N/UI:N; impact is CPU/time exhaustion only, so C:N/I:N/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.18.1, a crafted PDF containing a partially malformed /FlateDecode stream with padded data can force pypdf/filters.py to use inefficient byte-by-byte decompression while the earlier recovery counter fails to advance for bytes that successfully decode, causing long runtimes and application unavailability. This is a residual issue after the malformed FlateDecode recovery fix. This issue is fixed in version 6.18.1.
Blast Radius
ecosystem impact- 2 pypi packages depend on pypdf (2 direct, 0 indirect)
Ecosystem-wide dependent count for version 6.18.1.
Technical POC Analysis
Bug class: resource exhaustion - CWE-400 (Uncontrolled Resource Consumption), with the advisory additionally tagging CWE-407 (Inefficient Algorithmic Complexity).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A denial-of-service weakness in the widely embedded pypdf library (versions before 6.18.1) allows anyone who can submit a PDF to a pypdf-based service to exhaust CPU and render that service unavailable to legitimate users. Because pypdf is typically a dependency inside document processing, intake, or text-extraction pipelines, the affected surface is any customer-facing or internal workflow that accepts untrusted PDFs - no credentials or user interaction are required. Leadership should care because the impact is service downtime and customer-facing disruption rather than data theft, and the exposure grows with the number of internet-reachable document ingestion points.
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.
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
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
Memory exhaustion in pypdf versions prior to 6.19.0 allows a remote, unauthenticated attacker to make an application una
Denial of service in pypdf versions prior to 6.19.0 allows an unauthenticated remote attacker to pin a PDF-processing wo
Denial of service in pypdf versions prior to 6.19.0 allows remote, unauthenticated attackers to exhaust application CPU
Memory exhaustion in pypdf versions prior to 6.18.1 lets a crafted PDF force the library to allocate and process far mor
Memory exhaustion in pypdf versions prior to 6.18.1 allows unauthenticated remote attackers to crash or degrade any appl
Denial of service in pypdf versions prior to 6.18.0 allows remote, unauthenticated attackers to stall PDF parsing by sup
Memory-exhaustion denial of service in pypdf versions prior to 6.17.0 allows remote attackers to inflate application mem
EUVD-2026-90373
GHSA-jw7q-gvrg-4vj3
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB