Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft PDF with oversized /Widths font array
-
DeliverySubmit to pypdf-based extraction endpoint
-
ExploitFont._collect_tt_t1_character_widths processes >256 entries
-
ExecutionExcessive memory allocation
-
ImpactWorker OOM / service denial
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 | Requires that the target application invoke pypdf (version prior to 6.18.1) to parse an attacker-supplied PDF - specifically operations that read font widths such as text extraction - on a document containing a simple TrueType or Type1 font whose /Widths array holds more than the 256 entries meaningful for a one-byte-encoded simple font. No authentication, user interaction beyond supplying the document, or non-default configuration is needed. The practical limiting factor is that an application must actually feed untrusted PDFs into pypdf's extraction path; deployments that only process trusted internal documents, or that do not perform text/font extraction, are not exposed. Impact is confined to memory exhaustion of the processing worker - no code execution or data disclosure. |
| Impact | This is a genuine but bounded issue: a memory-exhaustion denial of service (CWE-400) in the pypdf pure-python PDF library, with no confidentiality or integrity impact. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H = 8.7 HIGH) captures a network-reachable, low-complexity, unauthenticated availability hit, which is a reasonable characterization for a library that routinely processes untrusted, user-supplied PDFs in server-side upload/extraction pipelines. However, the 8.7 'HIGH' rating overstates operational danger: the only impact is transient memory pressure during text extraction on a single crafted document, not code execution, data exposure, or persistent service loss. There is no EPSS score, no CISA KEV listing, and no public exploit identified at time of analysis - though the fixing PR (#4072) ships a reproducer test, so a trigger is trivially derivable. Signals are internally consistent (network-facing library DoS with a low-effort trigger), so no conflict to flag; the main caveat is that AV:N/UI:N assumes an application that automatically feeds attacker-controlled PDFs to pypdf, which is common but not universal. Net: a real defect worth patching promptly on internet-facing PDF-processing services, but a DoS-capped, non-critical priority rather than an emergency. |
| Exploit ScenarioDerived | An attacker uploads a crafted PDF to a web service that uses pypdf to extract text (e.g. a document indexer, search ingestion pipeline, or resume/invoice parser). The PDF declares a simple TrueType or Type1 font whose /Widths array contains far more than 256 entries; when Font._collect_tt_t1_character_widths iterates the oversized array, memory consumption balloons and the worker process is starved or OOM-killed. No public exploit is published, but the fix PR includes a test that reproduces the limit trigger, making a proof-of-concept easy to construct. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 30, 2026
Memory exhaustion in pypdf versions prior to 6.18.1 lets a crafted PDF force the library to allocate and process far more font-width data than a simple font can legitimately hold, degrading or crashing any process that extracts text or font metrics from untrusted documents. The parser fails to cap the /Widths array of a simple TrueType or Type1 font at the 256 one-byte character codes that such fonts can actually address, so an oversized array is walked entry by entry while widths are collected. The CVSS 4.0 vector (8.7, AV:N/AC:L/PR:N/UI:N, high availability-only impact) reflects unauthenticated remote triggering with no user interaction beyond supplying the file, and the availability-only profile confirms no confidentiality or integrity loss. No public exploit code has been identified at time of analysis, and there is no confirmed active exploitation (not in CISA KEV), though the trigger is trivially reproducible by anyone who can hand a PDF to a pypdf-consuming service; a vendor patch in 6.18.1 is available.
RemediationAI
Upgrade to pypdf 6.18.1, the vendor-released patch that adds the MAX_SIMPLE_FONT_WIDTH_ENTRY_COUNT = 256 guard in pypdf/_font.py and raises LimitReachedError on oversized /Widths arrays; the release is at https://github.com/py-pdf/pypdf/releases/tag/6.18.1, the fix commit is https://github.com/py-pdf/pypdf/commit/0fb26eb8cdd01c44b3b2c9fe8329751be2f7cfd5, and the change was merged via PR https://github.com/py-pdf/pypdf/pull/4072, with the advisory at https://github.com/py-pdf/pypdf/security/advisories/GHSA-g9cg-prrw-2r8q. Because the impacted surface is memory rather than code execution or data disclosure, patching is low-risk and should be applied to every environment that parses untrusted PDFs; after upgrading, callers should catch LimitReachedError alongside existing pypdf exceptions so that a rejected oversized-width document is surfaced as a benign parse failure instead of an unhandled traceback. Where upgrading is temporarily blocked, the actionable compensating controls are to constrain the parse itself: cap the memory of the worker or container that runs pypdf (cgroup/ulimit limits or a dedicated subprocess per document) with the trade-off that a malicious document will kill that worker rather than the whole service, accept only PDFs from trusted sources or after pre-validation that rejects fonts whose /Widths exceeds 256 entries, and disable or defer text-extraction and font-metric code paths on untrusted input - noting that skipping extraction removes the primary purpose of using pypdf and is a stopgap, not a fix. Network-level filtering is not an effective mitigation here, since the malicious content is inside a well-formed PDF rather than in a distinguishable request pattern.
Affected VersionsENISA
Affected Packages
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 library, meaning all parsing work runs in the interpreter's own heap - there is no native memory hardening or sandbox boundary to absorb oversized allocations, so an unbounded parse loop translates directly into Python object growth and process-level memory pressure. The root cause is CWE-400 (Uncontrolled Resource Consumption) in pypdf/_font.py, specifically Font._collect_tt_t1_character_widths. In the PDF font model, a 'simple' font (Type1 or TrueType with single-byte encoding) addresses at most 256 character codes (0-255), so its /Widths array is meaningful for at most 256 entries; the code nevertheless iterated whatever length the document declared. The upstream fix (PR #4072, commit 0fb26eb8cdd01c44b3b2c9fe8329751be2f7cfd5) introduces MAX_SIMPLE_FONT_WIDTH_ENTRY_COUNT = 256 and generalizes the existing __check_entry_count helper to accept a caller-supplied limit, invoking it against len(widths_array) before the widths are collected. When the array exceeds the limit, the library now raises LimitReachedError ("Too many character widths: N > 256.") rather than consuming memory, and the accompanying test confirms 256 entries are accepted while 257 raise. The CPE cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:* denotes the wildcard version range covering every release before the 6.18.1 tag. Note the resource-consumption path is reached during ordinary parsing operations such as text extraction - callers do not need to opt into a special font API - which is why exposure is governed by whether the application feeds attacker-controlled PDFs into pypdf at all.
Know when Pypdf gets its next vulnerability
- 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Untrusted PDF processed by a server-side library with no auth or interaction (AV:N/AC:L/PR:N/UI:N); impact is memory-exhaustion DoS only, so C:N/I:N/A:H.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
pypdf is a free and open-source pure-python PDF library. Prior to 6.18.1, a crafted PDF can provide a TrueType or Type1 simple font with an unusually large /Widths array, causing pypdf/_font.py Font._collect_tt_t1_character_widths to process entries beyond the 256 character codes meaningful for a simple font and consume excessive memory during operations such as text extraction. This issue is fixed in version 6.18.1.
Blast Radius
ecosystem impact- 2 pypi packages depend on pypdf (2 direct, 0 indirect)
Ecosystem-wide dependent count for version 6.18.1.
Technical POC Analysis
Source: advisory GHSA-g9cg-prrw-2r8q (py-pdf/pypdf).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
The pypdf library - embedded in many document-ingestion, analytics, and customer-facing upload pipelines - can be driven into memory exhaustion by a single crafted PDF, degrading or crashing any service that extracts text or font metrics from untrusted documents. The trigger is unauthenticated, requires no user interaction, and is trivially reproducible by anyone who can submit a file, while causing availability-only impact with no confidentiality or integrity loss. Because no vendor-released patch is currently available and there is no public exploit identified at time of analysis, leadership should treat this as an operational-resilience issue affecting document-processing uptime rather than a data-breach risk.
No vendor-released patch identified at time of analysis; advisory context references pypdf 6.18.1 as the version in which the issue is addressed, so upgrade to 6.18.1 or later through your distribution channel as soon as it is obtainable. Until then: isolate parsing in memory-capped, CPU-limited, auto-restarting worker processes with strict execution timeouts; enforce maximum uploaded PDF size and reject documents with abnormally large simple-font /Widths arrays before parsing; rate-limit and queue untrusted-document submissions; and monitor parsing hosts for out-of-memory kills to detect attempted exhaustion early.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Infinite loop denial of service in pypdf prior to 6.16.0 allows any attacker who can supply a crafted PDF to a pypdf-bas
pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. Rat
pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. Rat
pypdf is an open source, pure-python PDF library. Rated medium severity (CVSS 5.5), this vulnerability is no authenticat
Resource exhaustion in pypdf prior to 6.16.1 allows an attacker who can supply a crafted PDF to cause denial of service
Memory exhaustion in pypdf versions prior to 6.19.0 allows a remote, unauthenticated attacker to make an application una
Denial of service in pypdf versions prior to 6.19.0 allows an unauthenticated remote attacker to pin a PDF-processing wo
Denial of service in pypdf versions prior to 6.19.0 allows remote, unauthenticated attackers to exhaust application CPU
Denial of service in pypdf before 6.18.1 lets a crafted PDF drive the library's FlateDecode recovery path into inefficie
Memory exhaustion in pypdf versions prior to 6.18.1 allows unauthenticated remote attackers to crash or degrade any appl
Denial of service in pypdf versions prior to 6.18.0 allows remote, unauthenticated attackers to stall PDF parsing by sup
Memory-exhaustion denial of service in pypdf versions prior to 6.17.0 allows remote attackers to inflate application mem
EUVD-2026-90368
GHSA-g9cg-prrw-2r8q
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB