IT SBIT Services
Schneeberger
DEEN
CVE tracker

pypdf: Uncontrolled memory consumption via crafted /Widths array in fonts

CVE-2026-102996High 8.7

← All vulnerabilities

Summary

pypdf is a pure-Python PDF library used by applications to read, split, merge and extract text from PDF files. Versions before 6.18.1 do not limit the /Widths array of TrueType and Type1 simple fonts, so a crafted PDF can make the parser consume excessive memory. An attacker who can get such a file processed by an application (for example through an upload form or email attachment) can cause a denial of service; no credentials are required and confidentiality and integrity are not affected.

Affected

  • pypdf versions before 6.18.1 (Python package, PyPI)

Fixed in

  • pypdf 6.18.1 (released 2026-09-11), fix: limit entry count for TrueType and Type1 font /Widths (PR #4072)
  • Newer releases are available; check PyPI for the current version

Workaround

  • No vendor workaround documented; the fix is the upgrade.
  • Interim measure (suggestion): limit or sandbox processing of untrusted PDFs until upgraded.

Exploitation

  • No evidence of exploitation in the wild found.
  • CISA SSVC: Exploitation none, Automatable yes, Technical Impact partial.
  • No public proof of concept found in our searches.

Our recommendation

  • Inventory all pypdf installations, including requirements files, lockfiles, containers and transitive dependencies.
  • Upgrade to pypdf 6.18.1 or later, preferably the current release, and cover the whole 6.18.1+ series.
  • Restrict or sandbox processing of PDFs from untrusted sources until the upgrade is done.
  • Ask software vendors whether their products bundle pypdf.
  • Remove unused pypdf dependencies.
  • Priority: medium; patch in the next maintenance window, sooner if pypdf parses untrusted PDFs on a server.

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 06:28.

Original description (NVD)

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.

NVD references (4)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.