MEDIUM 5.5

CVE-2026-49461: pypdf Memory Exhaustion Vulnerability – Patch to 6.12.2

CVE-2026-49461 is a denial-of-service vulnerability in pypdf, a widely-used Python library for PDF processing. An attacker can craft a malicious PDF file that causes excessive memory consumption when a user or application extracts text from a page containing a specially-constructed form XObject with self-referential loops. This does not allow data theft or system compromise, but can exhaust memory resources and crash applications that depend on pypdf. The vulnerability is resolved in version 6.12.2.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.5 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weaknesses (CWE)
CWE-400
Affected products
1 configuration(s)
Published / Modified
2026-06-22 / 2026-06-25

NVD description (verbatim)

pypdf is a free and open-source pure-python PDF library. Prior to 6.12.2, an attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires extracting the text of a page which contains a form XObject with self-references. This vulnerability is fixed in 6.12.2.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability exists in pypdf's text extraction functionality when processing PDF form XObjects (referenced content streams) that contain self-referential structures. During text extraction, the library does not adequately limit recursion or memory allocation when traversing these circular references, resulting in unchecked heap allocation. An attacker-supplied PDF exploiting this condition will cause the application process to consume available system memory until the process terminates or the system becomes unresponsive. The issue is classified as CWE-400 (Uncontrolled Resource Consumption), and the attack vector requires local or direct file access rather than remote network exploitation.

Business impact

For organizations relying on pypdf for batch PDF processing, document automation, or embedded text extraction workflows, this vulnerability creates operational risk through resource exhaustion. A single malicious PDF could cause service interruptions or denial of service in applications that process untrusted PDF documents without memory limits. Data integrity is not compromised, but availability can be significantly degraded. The impact is particularly relevant for organizations handling user-submitted PDFs, web-based document conversion services, or automated compliance scanning tools that parse PDF content.

Affected systems

pypdf versions prior to 6.12.2 are affected. The library is commonly used in Python environments across data extraction, document processing, and integration workflows. Any application or service that uses an older version of pypdf and calls text extraction methods on untrusted PDF input is at risk. This includes both direct pypdf usage and indirect dependencies within larger document processing frameworks.

Exploitability

Exploitation requires an attacker to deliver a crafted PDF file to a target application or user. The CVSS vector indicates a local attack vector with low complexity and no user interaction required beyond opening or processing the file. However, practical exploitation depends on the application's threat model: if pypdf processes PDFs from trusted sources only, risk is lower; if it handles user-uploaded or internet-sourced documents, risk is substantially higher. No public exploit code or active weaponization is currently tracked, but the vulnerability is straightforward to exploit given its nature.

Remediation

Organizations should upgrade pypdf to version 6.12.2 or later. For applications that cannot immediately upgrade, implement defensive measures such as running PDF processing in isolated processes with enforced memory limits, avoiding text extraction on untrusted PDFs, or sandboxing document processing workflows. If pypdf is a transitive dependency, verify that dependent packages are also updated to require the patched version.

Patch guidance

Upgrade pypdf to 6.12.2 or later. Use your package manager (pip, poetry, conda) to update: pip install --upgrade pypdf>=6.12.2. Verify the installed version with pip show pypdf. If pypdf is specified in requirements.txt or setup.py, update constraints to enforce the minimum version. Test the upgrade in a staging environment with your existing PDF processing workflows to ensure compatibility. Monitor vendor advisories for any subsequent security patches.

Detection guidance

Log and monitor PDF processing operations, especially those involving text extraction. Alert on processes consuming unexpectedly high memory during PDF operations, or on crashes of PDF-processing applications. In code repositories, scan for pypdf versions earlier than 6.12.2 using dependency analysis tools (e.g., safety, pip-audit, SBOM analysis). Monitor for PDF files with unusual or recursive form XObject references if handling file uploads. Endpoint detection can flag memory exhaustion patterns consistent with denial-of-service attacks.

Why prioritize this

Although the CVSS score is moderate (5.5), this vulnerability should be prioritized based on scope: any organization processing untrusted PDFs faces real availability risk. Patching is straightforward and low-risk. The lack of KEV status reflects its recent publication and limited exploitation tracking, but does not diminish operational relevance for affected users. Prioritize based on your organization's exposure to user-supplied or internet-sourced PDF content.

Risk score, explained

The CVSS 3.1 score of 5.5 (MEDIUM) reflects a local attack vector, low complexity, and high impact on availability—but no impact on confidentiality or integrity. The score appropriately captures the denial-of-service nature of the vulnerability. Organizations processing untrusted PDFs may reasonably treat this as higher priority within their context, as availability impact can be severe in production systems.

Frequently asked questions

Can this vulnerability be exploited remotely?

No. The CVSS vector indicates a local attack vector, meaning the attacker must deliver the malicious PDF directly to the target application or user. However, if that application is a web service processing user-uploaded PDFs, the effective threat is still significant.

Does this vulnerability allow data exfiltration or code execution?

No. CVE-2026-49461 causes only denial of service through memory exhaustion. It does not compromise data confidentiality, modify data, or enable arbitrary code execution. The impact is operational availability only.

What should I do if I cannot upgrade immediately?

Implement process isolation with memory limits for PDF processing, avoid extracting text from untrusted PDFs, and consider moving PDF processing to a sandboxed environment. Monitor for unusual memory consumption during PDF operations and alert on process crashes.

How do I check if my application is affected?

Determine the version of pypdf in your environment using pip show pypdf or by examining your dependency lock file. If the version is earlier than 6.12.2, your installation is vulnerable. Check both direct imports and transitive dependencies from other packages.

This analysis is provided for informational and educational purposes. It reflects publicly available vulnerability data as of the publication date. Security assessments should account for your specific environment, threat model, and regulatory obligations. Always verify patch availability and compatibility against official vendor advisories before deploying updates. SEC.co makes no warranty regarding the completeness or accuracy of remediation guidance for any specific environment. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).