CVE-2026-59936: pypdf Infinite Loop Denial of Service Vulnerability (6.14.1)
A vulnerability in pypdf, a popular open-source Python PDF library, allows an attacker to crash or hang applications that process PDFs. By crafting a malicious PDF with a malformed inline image in the page content, an attacker can trigger an infinite loop when the library tries to extract text or process the page. This causes a denial of service, making the application unresponsive. The flaw affects all versions before 6.14.1 and has been patched in that release.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-400
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-07-08 / 2026-07-09
NVD description (verbatim)
pypdf is a free and open-source pure-python PDF library. Prior to 6.14.1, an attacker can craft a PDF with a page content stream containing a not terminated inline image, causing an infinite loop during inline image end marker detection such as when extracting page text. This issue is fixed in version 6.14.1.
4 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-59936 is a denial-of-service vulnerability in pypdf arising from improper handling of unterminated inline images (EI operator) in PDF content streams. When pypdf attempts to locate the end marker (EI) of an inline image, a crafted PDF containing a malformed or incomplete inline image definition causes the parser to enter an infinite loop. This occurs during text extraction or general page content processing. The root cause is insufficient validation of the inline image boundary, allowing an attacker to craft a PDF that never terminates the image data section. The vulnerability is classified as CWE-400 (Uncontrolled Resource Consumption), reflecting the algorithmic complexity and resource exhaustion nature of the flaw.
Business impact
Organizations relying on pypdf for automated PDF processing—such as document management systems, form extraction pipelines, compliance scanning tools, and content analysis workflows—face availability risk. A malicious PDF uploaded or supplied by an external party could hang or crash backend services without authentication or user interaction. This impacts service reliability and can disrupt business processes that depend on continuous PDF ingestion. For systems processing untrusted PDFs from the internet or open submissions, the risk is elevated.
Affected systems
pypdf versions prior to 6.14.1 are vulnerable. This includes all 6.x versions before 6.14.1, as well as earlier major versions. Any application or service using pypdf as a dependency is at risk if it processes PDFs from untrusted sources. This includes Python environments in web applications, data pipelines, document processing microservices, and libraries that wrap or embed pypdf.
Exploitability
This vulnerability requires only a crafted PDF file; there are no authentication barriers, network complexity, or user interaction required beyond the victim processing the malicious PDF. Distribution is trivial—the attacker simply needs the target application to open or parse the file. The CVSS score of 7.5 (HIGH) reflects the ease of exploitation and the direct availability impact, though confidentiality and integrity are unaffected. Exploitation does not require special system privileges or knowledge of the target environment.
Remediation
Upgrade pypdf to version 6.14.1 or later. Organizations should inventory all applications and services using pypdf as a dependency—including transitive dependencies—and apply the patch. For systems that cannot immediately upgrade, implement input validation by rejecting PDFs from untrusted sources or scanning incoming PDFs with external validation tools. Consider running PDF processing in isolated, resource-constrained containers to limit the blast radius of a denial-of-service event.
Patch guidance
Apply the pypdf 6.14.1 release or any later version. Update the library via your package manager (pip install --upgrade pypdf or equivalent). Verify the upgrade by checking the installed version and redeploying affected services. Test the patched version in a staging environment to confirm compatibility with your PDF workflows before rolling out to production. Check upstream dependencies—if your application imports pypdf indirectly, ensure the parent library or framework has been updated to use the patched version.
Detection guidance
Monitor for applications or services that hang or become unresponsive when processing certain PDF files. Log and inspect any PDFs that cause parsing timeouts or infinite loops. Use static analysis or dependency scanning tools (e.g., pip-audit, safety, Dependabot) to identify pypdf versions earlier than 6.14.1 in your codebase and dependencies. Implement application-level monitoring to detect when PDF processing threads or processes consume CPU indefinitely without completing. Track PDF source provenance—PDFs from untrusted or newly-introduced sources merit closer scrutiny if processing hangs occur.
Why prioritize this
Despite being unincorporated into the CISA KEV catalog, this vulnerability warrants near-term prioritization due to its HIGH CVSS score (7.5), ease of exploitation, and broad applicability to automated systems. pypdf is widely used in data pipelines, web platforms, and document processing stacks. The availability impact is direct and requires no user interaction, making it attractive to attackers targeting service disruption. Organizations should patch within 30 days, sooner for systems processing untrusted PDFs.
Risk score, explained
The CVSS 3.1 score of 7.5 reflects a network-exploitable denial-of-service vulnerability with no authentication requirement. The attack vector is network-based (AV:N), attack complexity is low (AC:L), no privileges are needed (PR:N), and user interaction is not required (UI:N). The scope is unchanged (S:U), and impact is limited to availability (A:H), with no compromise of confidentiality or integrity. This severity level is consistent with resource exhaustion flaws that disable service availability but do not leak data or enable further compromise.
Frequently asked questions
Can this vulnerability lead to remote code execution?
No. The vulnerability causes only a denial of service via infinite loop. It does not allow code execution, data theft, or privilege escalation. The attacker's sole capability is to hang or crash the application.
Do I need to patch if my application only processes PDFs from trusted internal sources?
If your PDF sources are genuinely internal and you control all ingestion points, the risk is lower. However, we recommend patching anyway as a defense-in-depth measure—trust boundaries can shift, and the patch is straightforward. If there's any possibility of PDFs entering your system from less-trusted sources (vendors, partners, user uploads), prioritize patching immediately.
What is the difference between pypdf versions 6.x and earlier major versions in terms of this vulnerability?
All versions prior to 6.14.1 are vulnerable, including 5.x, 4.x, and earlier. Upgrade paths depend on your current version; consult the pypdf release notes for any breaking changes between your version and 6.14.1.
How can I test if my PDF processing is hanging due to this vulnerability?
Implement timeout mechanisms around PDF processing operations. If a PDF processing call exceeds a reasonable time threshold (e.g., a few seconds for typical documents), log it and flag the PDF for review. Once patched, monitor whether previously problematic PDFs complete successfully.
This analysis is provided for informational purposes and is based on publicly available vulnerability data as of the publication date. Security threats and vendor responses evolve; always verify patch availability and applicability to your specific environment against official vendor advisories. Patch versions, release schedules, and support timelines are subject to change. Organizations should conduct their own risk assessment and testing before deploying patches to production. This document does not constitute professional security advice; consult your security team or a qualified security professional for guidance specific to your infrastructure. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-59937HIGHpypdf Denial-of-Service via Malformed PDF Cross-Reference Streams
- CVE-2026-48155MEDIUMpypdf Denial of Service via Malicious PDF Memory Exhaustion
- CVE-2026-49461MEDIUMpypdf Memory Exhaustion Vulnerability – Patch to 6.12.2
- CVE-2026-57204MEDIUMpypdf Denial-of-Service Memory Exhaustion Vulnerability
- CVE-2023-54365HIGHTraefik HTTP/2 Denial of Service Vulnerability – Rapid Reset Attack
- CVE-2024-14036HIGHDräger Core Denial of Service via Malformed SDC Messages
- CVE-2025-52293HIGHGPAC MP4Box HEVC Parser Denial of Service (CVSS 7.5)
- CVE-2025-53114HIGHCometD Denial-of-Service via Unacknowledged Message Queue Overflow