CVE-2026-27628
High · 7.5CVSS
7.5
EPSS
0.6%
Published
Feb 25, 2026
CISA due date
—
Cloudanix analysis
A malicious PDF can cause affected document-processing systems to get stuck and stop serving normal work until they are updated or protected with time limits.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
pypdf versions prior to 6.7.2 can enter an infinite loop while reading a specially crafted PDF. The flaw is an availability issue: successful triggering causes the parsing process or worker handling the document to consume CPU and fail to complete, potentially tying up application workers, queues, or serverless executions. The vulnerability does not indicate direct code execution, data theft, or integrity compromise, but any service that automatically ingests, validates, extracts text from, merges, splits, or otherwise reads untrusted PDFs with pypdf is exposed to denial-of-service risk.
Why it matters to the business
Applications that accept or process PDFs from users, partners, email attachments, document pipelines, or automated feeds may become slow, unresponsive, or unavailable when a malicious PDF is submitted. The practical impact can include stuck background jobs, exhausted worker pools, delayed document processing, failed uploads, increased infrastructure cost from runaway CPU consumption, and customer-facing service degradation. The EPSS score is low and the issue is not in CISA KEV, suggesting no broad public exploitation signal at this time, but the attack is low complexity wherever untrusted PDFs are processed.
How an attack unfolds
An attacker creates a malformed PDF designed to trigger the vulnerable parsing behavior in pypdf before version 6.7.2. The attacker then gets the target application to read that file, for example by uploading it to a web form, sending it through a document ingestion workflow, attaching it to a message that is automatically processed, or placing it where a scheduled job will parse it. When vulnerable pypdf code opens or reads the PDF, parsing does not terminate normally and the worker can spin indefinitely. Repeated submissions can amplify the impact by occupying multiple workers or queue consumers until the service times out, is restarted, or exhausts compute capacity.
How to fix it
Upgrade pypdf to version 6.7.2 or later wherever it is used. For source-based deployments, ensure the fix commit 4f1260f1d0c0c7c307f03e88257f8eeb229d5954 or a later upstream commit is present. Rebuild and redeploy applications, containers, serverless packages, and background workers that vendor or bundle pypdf. If immediate upgrade is not possible, apply the upstream patch manually and add compensating controls: enforce strict file-size limits, process untrusted PDFs in isolated workers, configure hard CPU and wall-clock timeouts for PDF parsing, cap queue retries, and terminate workers that exceed parsing time budgets. Treat all externally supplied PDFs as untrusted input.
How to confirm the fix worked
Confirm that dependency manifests, lockfiles, SBOMs, and runtime package inventories show pypdf 6.7.2 or later. In Python environments, verify with commands such as `python -m pip show pypdf` or `python -c "import pypdf; print(pypdf.__version__)"`. For source builds, confirm the deployed code includes commit 4f1260f1d0c0c7c307f03e88257f8eeb229d5954 or a later upstream revision. Validate that all services that parse PDFs have been rebuilt from updated dependencies, not only development lockfiles. Operationally, run regression tests for PDF upload, parsing, extraction, merge, and split workflows and confirm parsing timeouts are enforced. Security teams should also scan container images and build artifacts for older pypdf versions because vulnerable copies may be embedded outside the primary application dependency tree.
Typical attack path
- Identify an application or workflow that accepts PDF files and processes them using pypdf before version 6.7.2.
- Craft or obtain a PDF that triggers the infinite-loop condition during parsing.
- Submit the PDF through an upload endpoint, document-processing API, email ingestion route, file drop, or other input path.
- Wait for the backend parser to read the document with the vulnerable pypdf code path.
- Cause one or more workers to hang or consume excessive CPU while parsing never completes.
- Repeat submissions or trigger batch processing to exhaust worker capacity and degrade or deny service.
How to detect it
There is no unique public network signature or reliable file indicator for exploitation from the provided advisory; detection should focus on behavioral evidence around PDF ingestion. Review application logs, web access logs, upload audit trails, queue metrics, worker logs, container metrics, and host telemetry for PDF reads that coincide with long-running Python processes, worker timeouts, sustained high CPU, stuck jobs, repeated retries, or abrupt restarts. Hunt for repeated submissions of PDF files from the same source followed by parsing failures or timeouts in code paths using pypdf, PdfReader, PdfWriter, PdfMerger, or document extraction functions. In web and API logs, correlate PDF upload requests with backend latency spikes, HTTP 5xx responses, gateway timeouts, job timeouts, autoscaling events, and queue depth increases. In endpoint or container telemetry, look for Python processes consuming CPU for unusually long periods without corresponding I/O while processing PDF files. For forensic review, preserve suspicious PDFs, job payload metadata, worker stdout/stderr, crash or timeout logs, and package version evidence from affected runtimes. Treat the indicators below as operational hunt terms rather than definitive proof of compromise, because this denial-of-service flaw does not produce a known stable IOC.
- pypdf
- PdfReader
- PdfWriter
- PdfMerger
- pypdf==6.7.1
- pypdf==6.7.0
- pypdf==6.6
- pypdf==6.5
- pypdf==6.4
- pypdf==6.3
- pypdf==6.2
- pypdf==6.1
- pypdf==6.0
- Worker timeout
- worker timeout
- TimeoutError
- ReadTimeout
- Gateway Timeout
- HTTP 504
- application/pdf
- python
What your security team should do
- Inventory all applications, batch jobs, APIs, email processors, and document workflows that parse PDFs with pypdf, prioritizing internet-facing or externally supplied PDF ingestion paths.
- Upgrade all affected deployments to pypdf 6.7.2 or later, or apply upstream commit 4f1260f1d0c0c7c307f03e88257f8eeb229d5954 if using source builds.
- Add hard execution timeouts, CPU limits, memory limits, and worker isolation around PDF parsing so future parser bugs cannot indefinitely consume shared resources.
- Review logs and telemetry for suspicious PDF submissions followed by parser hangs, worker timeouts, high CPU, queue backlogs, or repeated retries.
- Ensure dependency scanning covers Python lockfiles, container images, vendored libraries, serverless deployment bundles, and build artifacts.
- Because current EPSS is low and the vulnerability is not known KEV, prioritize remediation based on exposure: externally reachable PDF ingestion services first, internal batch-only workflows second.
The record
pypdf is a free and open-source pure-python PDF library. Prior to 6.7.2, an attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires reading the file. This has been fixed in pypdf 6.7.2. As a workaround, one may apply the patch manually.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | pypdf | 0 | 6.7.2 |
| Chainguard | open-webui | 0 | 0.8.5-r0 |
| Wolfi | open-webui | 0 | 0.8.5-r0 |
| openSUSE:Leap 16.0 | python-PyPDF2 | 0 | 2.11.1-bp160.2.1 |
| openSUSE:Tumbleweed | python-PyPDF2 | 0 | 2.11.1-5.1 |
Related vulnerabilities
- GHSA-2rw7-x74f-jg35 pypdf has a possible infinite loop when loading circular /Prev entries in cross-reference… Same vulnerability
- CVE-2026-28804 pypdf is a free and open-source pure-python PDF library. Also affects pypdf
- GHSA-9m86-7pmv-2852 pypdf vulnerable to inefficient decoding of ASCIIHexDecode streams Also affects pypdf
- CVE-2026-28351 pypdf is a free and open-source pure-python PDF library. Also affects pypdf
- GHSA-x7hp-r3qg-r3cj pypdf: Manipulated FlateDecode XFA streams can exhaust RAM Also affects pypdf
- CVE-2026-27888 pypdf is a free and open-source pure-python PDF library. Also affects pypdf
- CVE-2026-27026 pypdf is a free and open-source pure-python PDF library. Also affects pypdf
- CVE-2026-27025 pypdf is a free and open-source pure-python PDF library. Also affects pypdf