CVE-2026-27025: CWE-834: Excessive Iteration in py-pdf pypdf
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 long runtimes and large memory consumption. This requires parsing the /ToUnicode entry of a font with unusually large values, for example during text extraction. This vulnerability is fixed in 6.7.1.
AI Analysis
Technical Summary
The vulnerability identified as CVE-2026-27025 affects the pypdf library, a widely used open-source pure-Python PDF processing tool. The issue arises from excessive iteration when parsing the /ToUnicode entry of fonts within a PDF document. An attacker can craft a malicious PDF containing unusually large or complex /ToUnicode mappings, which causes the pypdf parser to consume excessive CPU time and memory during text extraction operations. This leads to denial of service (DoS) conditions by significantly degrading performance or exhausting system resources. The vulnerability exists in all pypdf versions prior to 6.7.1 and does not require any privileges, authentication, or user interaction to exploit. The CVSS 4.0 base score is 6.9, reflecting a medium severity primarily due to the local attack vector and lack of direct confidentiality or integrity impact. The flaw is classified under CWE-834 (Excessive Iteration), indicating inefficient or uncontrolled looping in code. Although no public exploits have been reported, the vulnerability poses a risk to any system that automatically processes untrusted PDF files using vulnerable pypdf versions. The issue was addressed in pypdf 6.7.1 by likely adding limits or safeguards to the parsing logic of the /ToUnicode font entry to prevent resource exhaustion.
Potential Impact
The primary impact of CVE-2026-27025 is denial of service through resource exhaustion. Systems that use vulnerable versions of pypdf to parse or extract text from PDFs can experience significant slowdowns or crashes when processing maliciously crafted files. This can disrupt automated workflows such as document indexing, content extraction, or malware scanning that rely on pypdf. Organizations handling large volumes of PDF documents, especially from untrusted sources, are at risk of service interruptions or degraded performance. While the vulnerability does not directly compromise confidentiality or integrity, the availability impact can affect business continuity and user experience. In environments where PDF processing is part of security controls or data pipelines, this vulnerability could be leveraged as a vector to cause operational disruption. The lack of required authentication or user interaction increases the risk in automated or backend processing scenarios.
Mitigation Recommendations
To mitigate CVE-2026-27025, organizations should upgrade all instances of the pypdf library to version 6.7.1 or later, where the vulnerability is fixed. For environments where immediate upgrade is not feasible, implementing input validation or sandboxing of PDF processing tasks can reduce risk. Limiting resource allocation (CPU and memory) for PDF parsing processes can help contain potential denial of service effects. Monitoring for unusually high resource consumption during PDF processing and alerting on anomalies can provide early detection. Additionally, restricting the acceptance of PDFs from untrusted or unauthenticated sources reduces exposure. Developers should review and harden any custom PDF parsing code to avoid excessive iteration patterns. Incorporating rate limiting or queuing mechanisms for PDF processing jobs can further mitigate impact. Finally, maintaining an inventory of software dependencies and applying timely security updates is critical to prevent exploitation.
Affected Countries
United States, Germany, United Kingdom, France, Japan, Canada, Australia, India, South Korea, Netherlands
CVE-2026-27025: CWE-834: Excessive Iteration in py-pdf pypdf
Description
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 long runtimes and large memory consumption. This requires parsing the /ToUnicode entry of a font with unusually large values, for example during text extraction. This vulnerability is fixed in 6.7.1.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability identified as CVE-2026-27025 affects the pypdf library, a widely used open-source pure-Python PDF processing tool. The issue arises from excessive iteration when parsing the /ToUnicode entry of fonts within a PDF document. An attacker can craft a malicious PDF containing unusually large or complex /ToUnicode mappings, which causes the pypdf parser to consume excessive CPU time and memory during text extraction operations. This leads to denial of service (DoS) conditions by significantly degrading performance or exhausting system resources. The vulnerability exists in all pypdf versions prior to 6.7.1 and does not require any privileges, authentication, or user interaction to exploit. The CVSS 4.0 base score is 6.9, reflecting a medium severity primarily due to the local attack vector and lack of direct confidentiality or integrity impact. The flaw is classified under CWE-834 (Excessive Iteration), indicating inefficient or uncontrolled looping in code. Although no public exploits have been reported, the vulnerability poses a risk to any system that automatically processes untrusted PDF files using vulnerable pypdf versions. The issue was addressed in pypdf 6.7.1 by likely adding limits or safeguards to the parsing logic of the /ToUnicode font entry to prevent resource exhaustion.
Potential Impact
The primary impact of CVE-2026-27025 is denial of service through resource exhaustion. Systems that use vulnerable versions of pypdf to parse or extract text from PDFs can experience significant slowdowns or crashes when processing maliciously crafted files. This can disrupt automated workflows such as document indexing, content extraction, or malware scanning that rely on pypdf. Organizations handling large volumes of PDF documents, especially from untrusted sources, are at risk of service interruptions or degraded performance. While the vulnerability does not directly compromise confidentiality or integrity, the availability impact can affect business continuity and user experience. In environments where PDF processing is part of security controls or data pipelines, this vulnerability could be leveraged as a vector to cause operational disruption. The lack of required authentication or user interaction increases the risk in automated or backend processing scenarios.
Mitigation Recommendations
To mitigate CVE-2026-27025, organizations should upgrade all instances of the pypdf library to version 6.7.1 or later, where the vulnerability is fixed. For environments where immediate upgrade is not feasible, implementing input validation or sandboxing of PDF processing tasks can reduce risk. Limiting resource allocation (CPU and memory) for PDF parsing processes can help contain potential denial of service effects. Monitoring for unusually high resource consumption during PDF processing and alerting on anomalies can provide early detection. Additionally, restricting the acceptance of PDFs from untrusted or unauthenticated sources reduces exposure. Developers should review and harden any custom PDF parsing code to avoid excessive iteration patterns. Incorporating rate limiting or queuing mechanisms for PDF processing jobs can further mitigate impact. Finally, maintaining an inventory of software dependencies and applying timely security updates is critical to prevent exploitation.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-02-17T03:08:23.490Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6998e47bbe58cf853bd9f767
Added to database: 2/20/2026, 10:47:23 PM
Last enriched: 2/28/2026, 12:36:24 PM
Last updated: 4/7/2026, 4:37:12 AM
Views: 58
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.