
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-41313 is a denial-of-service vulnerability in pypdf, a free and open-source pure-Python PDF library, caused by excessive iteration when processing a crafted PDF with a large trailer /Size value in incremental mode. It affects all pypdf versions prior to 6.10.2 and was disclosed on April 22, 2026, with the fix released on April 15, 2026. The vulnerability carries a CVSS v3.1 base score of 6.5 (Medium) and a CVSS v4.0 base score of 4.8 (Medium) (GitHub Advisory, Feedly).
The root cause is classified as CWE-834 (Excessive Iteration): the vulnerable code in PdfWriter.clone_reader_document_root() unconditionally trusted the trailer's /Size field to allocate and iterate over objects during incremental cloning, without enforcing any upper bound on the value. Specifically, the pre-patch code executed self._objects = [None] * (cast(int, reader.trailer["/Size"]) - 1) followed by a loop over all indices, meaning a crafted PDF with an arbitrarily large /Size (e.g., 5,000,000) would cause the library to allocate a massive list and iterate over it, consuming significant CPU and memory. The fix in PR #3735 replaces this logic with _collect_incremental_clone_object_ids(), which enumerates only actual object IDs from the xref table and enforces configurable limits (incremental_clone_object_count_limit defaulting to 500,000 and incremental_clone_object_id_limit defaulting to 1,000,000) (GitHub PR, GitHub Commit).
Successful exploitation causes a denial-of-service condition: an application using a vulnerable version of pypdf to process attacker-supplied PDFs will experience severely degraded performance or become unresponsive due to excessive CPU and memory consumption. There is no impact on confidentiality or integrity — only availability is affected. Any service or pipeline that accepts and processes user-provided PDF files (e.g., document management systems, web upload handlers) is at risk of becoming unavailable to legitimate users (GitHub Advisory, Feedly).
No public proof-of-concept exploit code has been identified, and there is no evidence of in-the-wild exploitation at this time. The EPSS score is approximately 0.014% (0.000140), indicating a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires user interaction — specifically, an application must load the malicious PDF — but no authentication or special privileges are needed on the attacker's side (Feedly, GitHub Advisory).
/Size field to an extremely large value (e.g., /Size 5000000) in the trailer dictionary.PdfWriter with incremental=True or calls clone_reader_document_root() on the malicious PDF, which causes pypdf to read the inflated /Size value from the trailer.None values sized to /Size - 1 and iterates over all indices, consuming large amounts of memory and CPU time, causing the application to hang or become unresponsive (GitHub PR, GitHub Advisory).LimitReachedError (post-patch) indicating attempted exploitation against patched systems./Size values (e.g., in the millions) that do not correspond to the actual number of objects in the file; these can be identified by inspecting the trailer dictionary near the end of the PDF file for a /Size entry disproportionate to the file size.Upgrade pypdf to version 6.10.2 or later, which introduces object count and object ID limits for incremental cloning (defaulting to 500,000 and 1,000,000 respectively) and no longer trusts the trailer /Size value blindly (GitHub Release). If an immediate upgrade is not possible, manually apply the changes from PR #3735 to the local pypdf installation (GitHub PR). As an additional defense-in-depth measure, restrict PDF processing to trusted sources only and consider implementing pre-processing validation to reject PDFs with trailer /Size values that are disproportionately large relative to the file size.
The vulnerability was reported by researcher l3b4nk4 and analyzed and patched by pypdf maintainer stefan6419846, who published the security advisory and merged the fix on April 15, 2026 (GitHub Advisory). The NixOS/nixpkgs project tracked the issue and opened a corresponding update ticket (NixOS/nixpkgs#512719), indicating prompt uptake in downstream distributions. No significant broader media coverage or notable social media discussion has been identified beyond standard vulnerability aggregator listings.
Fix availability across major Linux distributions and their releases.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."