CVE-2026-48156: pypdf Denial of Service via Malicious PDF Cross-Reference Streams
pypdf, a popular open-source Python library for PDF handling, contains a vulnerability that allows an attacker to craft malicious PDF files that cause the library to consume excessive processing time during parsing. The issue stems from how pypdf processes cross-reference streams—a mechanism PDFs use to index internal objects—when they contain specific structural patterns. An attacker would need to trick a user or application into opening a specially crafted PDF, but once opened, the library can hang or freeze during PDF processing, resulting in a denial-of-service condition on that system.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 3.3 LOW · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
- Weaknesses (CWE)
- CWE-834
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-05-28 / 2026-06-17
NVD description (verbatim)
pypdf is a free and open-source pure-python PDF library. Prior to 6.12.0, an attacker who uses this vulnerability can craft a PDF which leads to long runtimes. This requires cross-reference streams with /W [0 0 0] values and large /Size values. This vulnerability is fixed in 6.12.0.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-48156 is a denial-of-service vulnerability in pypdf versions prior to 6.12.0, classified under CWE-834 (Excessive Iteration). The flaw is triggered by malicious cross-reference streams with /W [0 0 0] subsection width values combined with large /Size entries. These parameters control how pypdf interprets the binary stream data that indexes PDF objects. When configured with zero-width fields and inflated size declarations, the parsing logic enters a computationally expensive loop, causing runtime to spike dramatically. The vulnerability requires user interaction (opening the PDF) and affects only the availability of the parsing process on the local system.
Business impact
Organizations using pypdf in automated document processing pipelines, web services, or batch operations face potential service disruption if malicious PDFs are introduced. A sustained attack involving many crafted PDFs could exhaust CPU and memory resources, slowing or halting legitimate document workflows. The impact is primarily operational (slowdown) rather than data-centric; no data is leaked or corrupted. The risk is elevated in environments where PDFs are accepted from untrusted sources or via user upload without pre-validation.
Affected systems
pypdf prior to version 6.12.0 is affected. This includes all community deployments and downstream applications that embed pypdf as a dependency. Any Python environment using an older version of pypdf—whether standalone, as part of a larger application stack, or in containerized deployments—remains vulnerable until upgraded.
Exploitability
Exploitability is moderate in practical scenarios. The attack requires an attacker to craft a PDF with specific cross-reference stream properties and convince or trick a user or system to process it. The CVSS score of 3.3 (LOW) reflects that local user interaction is required and only availability is impacted. However, in automated or cloud-based document processing environments where PDFs are ingested without strict validation, exploitability could be higher. No public exploit code or automation is known at this time.
Remediation
Upgrade pypdf to version 6.12.0 or later. The patch hardens the cross-reference stream parsing logic to handle malformed or adversarial /W and /Size combinations without excessive iteration. Verify the upgrade by checking pypdf version post-deployment. Additionally, implement input validation and sanitization for PDFs from untrusted sources, such as file type verification, size limits, and scanning with document safety tools before processing.
Patch guidance
Update pypdf using your package manager: 'pip install --upgrade pypdf' or specify 'pypdf>=6.12.0' in your requirements.txt or dependency manifest. Verify installation with 'python -c "import pypdf; print(pypdf.__version__)"' to confirm version 6.12.0 or later. For containerized deployments, rebuild images with the updated dependency. Test the upgrade in a staging environment with representative PDF files before rolling out to production to ensure no regressions.
Detection guidance
Monitor process CPU and memory usage for pypdf-based applications when processing PDFs. Unusually high CPU or prolonged hangs during PDF parsing may indicate an attack. Log and alert on any exceptions or timeouts during PDF operations. Implement file integrity monitoring on uploaded PDFs and scan them with antivirus or PDF-specific analysis tools. Review application logs for evidence of many failed or slow PDF processing attempts. Correlation of service slowdowns with recent PDF uploads warrants investigation.
Why prioritize this
Although marked LOW severity, prioritize patching based on your environment. If pypdf is used in user-facing services or critical batch operations, upgrade promptly to eliminate operational risk. If pypdf is only used in isolated development or testing environments with trusted PDFs, this can be deprioritized. The low CVSS reflects limited scope (local, availability only), but the ease of causing disruption in high-volume document processing pipelines justifies attention.
Risk score, explained
The CVSS 3.1 score of 3.3 (LOW) is driven by: attack vector LOCAL (requires file to be opened on the system), attack complexity LOW (no special conditions beyond a crafted PDF), no privileges required, no user privileges involved in the vulnerable code path, user interaction required (someone must open or process the PDF), scope UNCHANGED (only the parsing process is affected), and impact LIMITED to availability (denial of service via slowdown, not crash). The score does not account for business context; in high-volume processing scenarios, the practical risk may feel higher.
Frequently asked questions
Can this vulnerability be exploited remotely?
No. The attack requires a user or system to locally open or process the malicious PDF file. Remote exploitation would require the PDF to be delivered and processed by a vulnerable system, such as through an automated document processing API or email attachment workflow. In such scenarios, the delivery vector is remote, but the vulnerability itself is local.
Does this affect data confidentiality or integrity?
No. This is purely a denial-of-service issue affecting availability. The vulnerability does not allow an attacker to read, modify, or exfiltrate data from PDFs or the host system. It only causes the PDF parser to consume excessive CPU, potentially freezing the application.
Which Python versions are affected?
pypdf is a pure-Python library compatible with Python 3.6 and later. All versions using pypdf <6.12.0 on any Python version are affected. The vulnerability is independent of the Python version itself.
How do I know if my organization uses pypdf?
Check your application's dependency files (requirements.txt, pyproject.toml, Pipfile, setup.py, etc.) or run 'pip list | grep pypdf' in relevant Python environments. Also check downstream dependencies—any package that lists pypdf as a requirement could be affected. Use software composition analysis (SCA) tools to identify all instances.
This analysis is provided for informational purposes. Always verify patch availability and compatibility with your specific environment before applying updates. Consult the official pypdf project repository and vendor advisories for authoritative guidance. This vulnerability information reflects the state as of the published date; refer to the NVD, MITRE, and pypdf maintainers for updates. No liability for actions taken or not taken based on this analysis. Source: NVD (public-domain), retrieved 2026-07-07. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-45680MEDIUMOpenTelemetry eBPF Instrumentation CPU Exhaustion DoS
- CVE-2026-48155MEDIUMpypdf Denial of Service via Malicious PDF Memory Exhaustion
- CVE-2026-48735MEDIUMpypdf Memory Exhaustion via Malicious XMP Metadata
- CVE-2024-42206LOWHCL iReflection Third-Party Component Vulnerability
- CVE-2025-48616LOWAndroid Lockdown Bypass via Screen Pinning Logic Error
- CVE-2025-52608LOWHCL iControl Missing Cookie Attributes Vulnerability
- CVE-2025-52609LOWHCL iControl Missing Security Headers XSS Vulnerability
- CVE-2025-52611LOWHCL iControl Stack Trace Disclosure (v4.0.0)