Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-31826: CWE-770: Allocation of Resources Without Limits or Throttling in py-pdf pypdf

0
Medium
VulnerabilityCVE-2026-31826cvecve-2026-31826cwe-770
Published: Tue Mar 10 2026 (03/10/2026, 21:36:52 UTC)
Source: CVE Database V5
Vendor/Project: py-pdf
Product: pypdf

Description

pypdf is a free and open-source pure-python PDF library. Prior to 6.8.0, an attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires parsing a content stream with a rather large /Length value, regardless of the actual data length inside the stream. This vulnerability is fixed in 6.8.0.

AI-Powered Analysis

AILast updated: 03/11/2026, 16:29:36 UTC

Technical Analysis

The vulnerability identified as CVE-2026-31826 affects the py-pdf pypdf library, a pure-Python library widely used for PDF manipulation and parsing. Prior to version 6.8.0, the library does not impose limits or throttling on resource allocation when parsing PDF content streams. Specifically, an attacker can craft a PDF file containing a content stream with a deliberately large /Length value, which is a PDF object attribute indicating the expected length of the stream data. The library trusts this /Length value without validating it against the actual data length, leading to excessive memory allocation during parsing. This unchecked allocation can cause the consuming application to use large amounts of memory, potentially exhausting system resources and causing denial of service (DoS). The vulnerability does not require authentication but does require user interaction, such as opening or processing the malicious PDF. The CVSS 4.0 score of 6.8 reflects a medium severity, considering the local attack vector, low complexity, no privileges required, and user interaction needed. No known exploits have been reported in the wild as of publication. The issue was addressed in pypdf version 6.8.0 by implementing proper validation and limits on resource allocation during stream parsing, preventing excessive memory consumption.

Potential Impact

This vulnerability can lead to denial of service conditions in applications that use vulnerable versions of pypdf to process untrusted PDF files. Attackers can exploit this by sending crafted PDFs to users or systems that automatically parse or render PDFs, causing excessive memory consumption and potentially crashing the application or degrading system performance. This can disrupt business operations, especially in environments where PDF processing is automated or integrated into workflows such as document management systems, email gateways, or web applications. While it does not lead to code execution or data leakage, the resource exhaustion impact can be significant in high-volume or critical systems. Organizations relying on pypdf for PDF handling should consider the risk of service disruption and potential operational impact if exposed to malicious PDFs.

Mitigation Recommendations

The primary mitigation is to upgrade all instances of pypdf to version 6.8.0 or later, where the vulnerability is fixed. For environments where immediate upgrade is not feasible, implement strict input validation and sandboxing of PDF processing workflows to isolate resource consumption. Limit the memory and CPU resources available to processes handling PDFs using operating system controls or containerization. Employ network-level controls to block or quarantine suspicious PDF attachments or files from untrusted sources. Monitor application logs and system metrics for unusual memory usage patterns indicative of exploitation attempts. Additionally, consider implementing PDF content scanning tools that detect anomalous or malformed PDF objects, including abnormally large /Length values, to prevent malicious files from reaching vulnerable systems.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-09T17:41:56.077Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69b194fa2f860ef943342471

Added to database: 3/11/2026, 4:14:50 PM

Last enriched: 3/11/2026, 4:29:36 PM

Last updated: 3/11/2026, 8:24:21 PM

Views: 7

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses