Skip to main content

pypdf EUVDEUVD-2026-38356

| CVE-2026-49461 MEDIUM
Uncontrolled Resource Consumption (CWE-400)
2026-06-16 https://github.com/py-pdf/pypdf GHSA-j543-4vmf-qm7v
6.9
CVSS 4.0 · Vendor: https://github.com/py-pdf/pypdf
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft PDF with self-referencing form XObject
  2. Delivery
    Deliver PDF to application accepting untrusted uploads
  3. Exploit
    Application calls extract_text() on the affected page
  4. Execution
    Recursive XObject resolution enters infinite loop
  5. Persist
    Heap memory exhausted
  6. Impact
    Application process crashes or is OOM-killed

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the vulnerable application calls extract_text() (or internally calls extract_xform_text()) on a page from an attacker-supplied PDF, and that the PDF contains a form XObject with a self-referential or cyclic entry in its /Resources /XObject dictionary. Applications that do not perform text extraction - such as those that only read PDF metadata, manipulate pages, or render without extracting text - are not affected. No special pypdf configuration, platform, or operating system is required; any deployment of pypdf < 6.12.2 that processes untrusted PDFs with text extraction is vulnerable. If the PDF upload endpoint requires authentication, an attacker must hold at least a low-privilege authenticated account to exploit; if uploads are open to anonymous users, no credentials are needed.

Impact

No CVSS vector or EPSS score was provided in the source data, so risk metrics are independently assessed rather than sourced from NVD or vendor. Structurally, the attack complexity is low: crafting the malicious PDF requires only embedding a self-referential XObject resource dictionary, a technique fully reverse-engineerable from the public PR diff. No authentication or privileges are required if the target application accepts PDF uploads from unauthenticated users. Impact is confined to availability - memory exhaustion causing process crash or OOM kill - with no confidentiality or integrity consequences. Risk is highest for web services and automated document pipelines that process untrusted PDFs and call extract_text() without per-request memory limits. Applications that do not invoke text extraction (e.g., metadata-only readers) are entirely unaffected, which substantially narrows the real-world attack surface. The absence of KEV listing and public exploit code suggests this has not been actively weaponized, though the attack primitive is trivial to construct given the public advisory and diff.

Exploit ScenarioDerived

An attacker uploads a crafted PDF to a document processing web application that uses pypdf to index page text. The PDF contains a form XObject whose /Resources /XObject dictionary includes a self-reference, causing page.extract_text() to recurse without bound. The application process exhausts available heap memory and is terminated by the OOM killer, denying service to legitimate users. No public exploit code is currently known, but the attack is straightforward to construct from the public advisory and PR diff.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 16, 2026

Uncontrolled resource consumption in pypdf versions before 6.12.2 allows any attacker who can cause an application to call extract_text() on a crafted PDF to trigger unbounded memory growth, resulting in denial of service. The vulnerability arises specifically during form XObject traversal: a PDF containing a self-referencing XObject resource dictionary causes the extraction code to recurse infinitely without cycle detection. No public exploit code has been identified at time of analysis, and this vulnerability does not appear in the CISA KEV catalog.

RemediationAI

Upgrade to pypdf 6.12.2 or later, released at https://github.com/py-pdf/pypdf/releases/tag/6.12.2 - this is the definitive fix. If an immediate upgrade is not possible, the patch changes from PR #3805 (https://github.com/py-pdf/pypdf/pull/3805) can be applied manually to pypdf/_page.py; the change threads a known_ids set through _extract_text() and extract_xform_text() to detect and short-circuit cyclic XObject references. As a compensating control without code changes, enforce per-process memory limits before calling extract_text() on untrusted PDFs using OS-level ulimits or container memory caps (e.g., Docker --memory); this limits blast radius but does not prevent the vulnerability. Isolating extraction in a subprocess with a memory ceiling and timeout is the most robust compensating control - the trade-off is added latency and process-spawn overhead. Disabling or gating extract_text() calls on PDFs from untrusted sources is also effective if text extraction is not required for all inputs.

Affected VersionsENISA

pypdf < 6.12.2

Affected Packages

pypi pypdf fix: 6.12.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

pypdf is a pure-Python PDF manipulation library distributed via pip (pkg:pip/pypdf). The affected code path is the _extract_text() and extract_xform_text() methods in pypdf/_page.py. PDF form XObjects (dictionary entries with /Subtype /Form) are reusable content streams embedded in a page's resource dictionary that the text extractor recursively processes. Prior to the fix, no visited-node tracking was maintained across recursive calls, so a form XObject whose /Resources /XObject dictionary included a reference back to itself could drive infinite recursion and unbounded heap allocation. CWE-400 (Uncontrolled Resource Consumption) precisely describes the root cause: the code placed no upper bound on XObject traversal depth or memory consumption. The PR #3805 fix introduces a known_ids set (keyed on Python object identity via id(xform)) threaded through the call chain; detection of a cycle causes the code to emit a warning and return an empty string rather than recurse.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/py-pdf/pypdf) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Network-delivered PDF triggers memory exhaustion with no authentication or user interaction required; only availability is impacted.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 5.5 MEDIUM

Primary rating from Vendor (https://github.com/py-pdf/pypdf).

CVSS VectorVendor: https://github.com/py-pdf/pypdf

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
Jun 22, 2026 - 21:39 NVD
6.9 (MEDIUM)

DescriptionCVE.org

Impact

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.

Patches

This has been fixed in pypdf==6.12.2.

Workarounds

If you cannot upgrade yet, consider applying the changes from PR #3805.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 2 pypi packages depend on pypdf (2 direct, 0 indirect)

Ecosystem-wide dependent count for version 6.12.2.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Threat Intel
1
1 source
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy