CVE-2025-66019: CWE-400: Uncontrolled Resource Consumption in py-pdf pypdf
pypdf is a free and open-source pure-python PDF library. Prior to version 6.4.0, an attacker who uses this vulnerability can craft a PDF which leads to a memory usage of up to 1 GB per stream. This requires parsing the content stream of a page using the LZWDecode filter. This issue has been patched in version 6.4.0.
AI Analysis
Technical Summary
CVE-2025-66019 is an uncontrolled resource consumption vulnerability (CWE-400) found in the pypdf library, a pure-Python open-source PDF manipulation tool widely used for reading and modifying PDF files. The flaw exists in versions prior to 6.4.0 and is triggered when parsing PDF content streams that use the LZWDecode filter. An attacker can craft a specially designed PDF file with malicious content streams that cause the parser to consume excessive memory—up to approximately 1 GB per stream—due to inefficient handling of the LZWDecode decompression process. This can lead to denial of service conditions by exhausting system memory, potentially crashing applications or degrading performance. The vulnerability requires no privileges, authentication, or user interaction, making it remotely exploitable simply by processing a malicious PDF. Although no known exploits are currently in the wild, the vulnerability poses a significant risk to any system that automatically processes untrusted PDFs using vulnerable pypdf versions. The issue was addressed and patched in pypdf version 6.4.0 by improving resource management during LZWDecode stream parsing.
Potential Impact
For European organizations, the impact primarily involves denial of service scenarios where critical PDF processing applications or services become unresponsive or crash due to memory exhaustion. Industries such as finance, legal, government, and publishing that rely heavily on automated PDF workflows are at risk of operational disruption. Memory exhaustion can also lead to cascading failures in multi-tenant environments or cloud services, affecting availability and potentially causing downtime. Confidentiality and integrity are less directly impacted, but availability degradation can hinder business continuity and service delivery. Organizations using older versions of pypdf in document ingestion pipelines, content management systems, or automated report generation tools are particularly vulnerable. The absence of required authentication or user interaction increases the risk of exploitation from external sources, including malicious email attachments or web uploads.
Mitigation Recommendations
The primary mitigation is to upgrade all instances of pypdf to version 6.4.0 or later, where the vulnerability has been patched. Organizations should audit their software dependencies to identify any usage of vulnerable pypdf versions, including indirect dependencies in larger applications. Implement input validation and sandboxing for PDF processing workflows to limit resource consumption and isolate failures. Deploy resource limits (memory quotas) on processes handling PDF parsing to prevent system-wide impact. Monitor application logs and system metrics for unusual memory spikes during PDF processing. Consider employing runtime application self-protection (RASP) or endpoint detection tools to detect anomalous behavior related to PDF parsing. Educate developers and system administrators about the risks of processing untrusted PDFs and enforce strict file source validation policies. Finally, maintain an up-to-date inventory of third-party libraries and apply security patches promptly.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain
CVE-2025-66019: CWE-400: Uncontrolled Resource Consumption in py-pdf pypdf
Description
pypdf is a free and open-source pure-python PDF library. Prior to version 6.4.0, an attacker who uses this vulnerability can craft a PDF which leads to a memory usage of up to 1 GB per stream. This requires parsing the content stream of a page using the LZWDecode filter. This issue has been patched in version 6.4.0.
AI-Powered Analysis
Technical Analysis
CVE-2025-66019 is an uncontrolled resource consumption vulnerability (CWE-400) found in the pypdf library, a pure-Python open-source PDF manipulation tool widely used for reading and modifying PDF files. The flaw exists in versions prior to 6.4.0 and is triggered when parsing PDF content streams that use the LZWDecode filter. An attacker can craft a specially designed PDF file with malicious content streams that cause the parser to consume excessive memory—up to approximately 1 GB per stream—due to inefficient handling of the LZWDecode decompression process. This can lead to denial of service conditions by exhausting system memory, potentially crashing applications or degrading performance. The vulnerability requires no privileges, authentication, or user interaction, making it remotely exploitable simply by processing a malicious PDF. Although no known exploits are currently in the wild, the vulnerability poses a significant risk to any system that automatically processes untrusted PDFs using vulnerable pypdf versions. The issue was addressed and patched in pypdf version 6.4.0 by improving resource management during LZWDecode stream parsing.
Potential Impact
For European organizations, the impact primarily involves denial of service scenarios where critical PDF processing applications or services become unresponsive or crash due to memory exhaustion. Industries such as finance, legal, government, and publishing that rely heavily on automated PDF workflows are at risk of operational disruption. Memory exhaustion can also lead to cascading failures in multi-tenant environments or cloud services, affecting availability and potentially causing downtime. Confidentiality and integrity are less directly impacted, but availability degradation can hinder business continuity and service delivery. Organizations using older versions of pypdf in document ingestion pipelines, content management systems, or automated report generation tools are particularly vulnerable. The absence of required authentication or user interaction increases the risk of exploitation from external sources, including malicious email attachments or web uploads.
Mitigation Recommendations
The primary mitigation is to upgrade all instances of pypdf to version 6.4.0 or later, where the vulnerability has been patched. Organizations should audit their software dependencies to identify any usage of vulnerable pypdf versions, including indirect dependencies in larger applications. Implement input validation and sandboxing for PDF processing workflows to limit resource consumption and isolate failures. Deploy resource limits (memory quotas) on processes handling PDF parsing to prevent system-wide impact. Monitor application logs and system metrics for unusual memory spikes during PDF processing. Consider employing runtime application self-protection (RASP) or endpoint detection tools to detect anomalous behavior related to PDF parsing. Educate developers and system administrators about the risks of processing untrusted PDFs and enforce strict file source validation policies. Finally, maintain an up-to-date inventory of third-party libraries and apply security patches promptly.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-11-21T01:08:02.613Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69263fd05765e822eef9c745
Added to database: 11/25/2025, 11:46:24 PM
Last enriched: 11/26/2025, 12:01:16 AM
Last updated: 11/26/2025, 12:51:12 AM
Views: 4
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.
Related Threats
CVE-2025-65957: CWE-200: Exposure of Sensitive Information to an Unauthorized Actor in Intercore-Productions Core-Bot
HighCVE-2025-64657: CWE-121: Stack-based Buffer Overflow in Microsoft Azure App Gateway
CriticalCVE-2025-64656: CWE-125: Out-of-bounds Read in Microsoft Azure App Gateway
CriticalRussian Hackers Target US Engineering Firm Because of Work Done for Ukrainian Sister City
MediumCVE-2025-65963: CWE-284: Improper Access Control in humhub cfiles
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.