CVE-2026-27024
Medium · 5.5CVSS
5.5
EPSS
0.2%
Published
Feb 20, 2026
CISA due date
—
Cloudanix analysis
A malicious PDF can cause software that reads PDF files to freeze, potentially disrupting services that rely on processing uploaded or received documents.
- Exploitation
- Local Privilege
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The flaw is an algorithmic denial-of-service condition in pypdf versions prior to 6.7.1. A specially crafted PDF can cause pypdf to enter an infinite loop when code traverses the children of a TreeObject, such as when reading document outlines/bookmarks. The impact is availability loss: the affected Python process can hang, consume CPU, hold worker threads or jobs indefinitely, and prevent normal PDF processing. There is no indicated confidentiality or integrity impact and no evidence that the issue enables code execution.
Why it matters to the business
Applications, background workers, document ingestion pipelines, and user-facing services that process untrusted PDFs with vulnerable pypdf versions can be disrupted by a malicious or malformed PDF. The practical consequence is failed or stalled PDF uploads, stuck queues, elevated compute usage, degraded service availability, and potential knock-on delays in business workflows that depend on PDF parsing. The CVSS score is moderate and EPSS is very low, with no KEV listing or known ransomware association, so this is most urgent for internet-facing or high-volume PDF processing systems rather than a broad emergency patch event.
How an attack unfolds
An attacker creates a PDF with a malformed or cyclic TreeObject structure that triggers non-terminating traversal when pypdf accesses children, commonly during outline or bookmark parsing. The attacker then gets the target application to process the file, for example by uploading it to a portal, submitting it to an email/document ingestion workflow, or placing it where an automated job will parse PDFs. When vulnerable application code invokes pypdf functionality that walks the affected tree, the parser loops indefinitely. The worker handling the file may hang until killed or timed out; repeated submissions can exhaust worker capacity and cause broader denial of service.
How to fix it
Upgrade pypdf to version 6.7.1 or later. For source-based deployments tracking the upstream Git repository, ensure the code includes commit ad2a45d769d56038af8747195cae097bbdb68eee or a later commit containing the fix. Rebuild and redeploy applications, containers, serverless packages, and worker images that vendor or pin pypdf. If immediate upgrade is not possible, reduce risk by enforcing strict processing timeouts, job cancellation limits, worker memory/CPU quotas, upload rate limits, file size limits, and isolation of PDF parsing in separate low-privilege worker processes. Consider disabling outline/bookmark extraction from untrusted PDFs until patched if the application does not require that functionality.
How to confirm the fix worked
Confirm dependency resolution shows pypdf 6.7.1 or later in every runtime environment, not just in source manifests. Check package lock files, container images, virtual environments, build artifacts, and vendored dependencies. For Git-based deployments, verify the checked-out revision contains commit ad2a45d769d56038af8747195cae097bbdb68eee or later. Exercise representative PDF parsing workflows after upgrade, especially those that read outlines/bookmarks or traverse TreeObject children, and confirm malformed PDFs are rejected or time out cleanly rather than hanging workers. Validate operational safeguards by confirming parsing jobs have enforced wall-clock timeouts and that stuck jobs are terminated and logged.
Typical attack path
- Identify an application or workflow that accepts or processes PDF files using pypdf before version 6.7.1.
- Craft a PDF containing a problematic TreeObject child relationship, such as in outlines/bookmarks, that causes traversal to never terminate.
- Submit or deliver the PDF to the target upload, ingestion, conversion, indexing, or extraction workflow.
- Wait for the vulnerable code path to access TreeObject children during parsing.
- Cause the processing thread, worker, or job to hang in an infinite loop, consuming availability resources.
- Repeat delivery or submit multiple files to amplify service degradation, queue buildup, or worker exhaustion.
How to detect it
Look for evidence of PDF processing jobs that hang, exceed normal execution time, or are forcibly terminated while using pypdf. Relevant sources include application upload logs, document processing worker logs, job queue records, container or process supervisor logs, APM traces, CPU utilization metrics, and web/API access logs for PDF submissions shortly before worker hangs. Investigate repeated uploads from the same source followed by parsing timeouts, queue backlog growth, worker restarts, or sustained CPU usage in Python processes. Because the public description does not define a unique byte pattern for malicious PDFs, detection should focus on behavioral indicators: long-running or stuck pypdf parsing calls, repeated timeout/kill events, and correlation between specific PDF filenames, hashes, uploaders, or source IPs and service degradation. Preserve suspect PDF files and calculate hashes for internal blocking once identified.
- pypdf
- TreeObject
- outlines
- outline
- bookmarks
- PdfReader
- TimeoutError
- Killed
- SIGKILL
- SIGTERM
- worker timeout
- job timeout
- PDF processing timeout
- PDF parsing timeout
- maximum execution time exceeded
- stuck PDF job
What your security team should do
- Inventory applications, services, batch jobs, and third-party components that process user-supplied PDFs with pypdf.
- Prioritize upgrades to pypdf 6.7.1 or later for internet-facing upload paths, email/document ingestion systems, and high-volume PDF processing workers.
- Redeploy all affected runtime artifacts, including containers, serverless bundles, virtual environments, and vendored dependency packages.
- Add or verify hard timeouts and resource limits around PDF parsing so a single file cannot indefinitely occupy a worker.
- Monitor document processing queues and worker health for hangs, repeated job timeouts, or CPU saturation associated with PDF parsing.
- If exploitation is suspected, preserve submitted PDF samples, application logs, worker telemetry, and queue metadata for analysis.
- Add regression tests using malformed/cyclic PDF outline structures to ensure future parser changes do not reintroduce unbounded traversal.
The record
pypdf is a free and open-source pure-python PDF library. Prior to 6.7.1, an attacker who uses this vulnerability can craft a PDF which leads to an infinite loop. This requires accessing the children of a TreeObject, for example as part of outlines. This vulnerability is fixed in 6.7.1.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | pypdf | 0 | 6.7.1 |
| Chainguard | open-webui | 0 | 0.8.3-r1 |
| Wolfi | open-webui | 0 | 0.8.3-r1 |
| openSUSE:Leap 16.0 | python-PyPDF2 | 0 | 2.11.1-bp160.2.1 |
| openSUSE:Tumbleweed | python-PyPDF2 | 0 | 2.11.1-4.1 |
| openSUSE:Tumbleweed | python-pypdf | 0 | 6.7.5-1.1 |
Related vulnerabilities
- 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
- GHSA-2rw7-x74f-jg35 pypdf has a possible infinite loop when loading circular /Prev entries in cross-reference… Also affects pypdf
- CVE-2026-27628 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