# CVE-2026-102996: pypdf excessive memory consumption via TrueType/Type1 font /Widths

Source: https://junglewise.ai/threats/cve-2026-102996-pypdf-is-a-free-and-open-source-pure-python-pdf-library-prior-to  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-30. Updated: 2026-09-30  
License: CC BY 4.0 with a link back

CVE-2026-102996 · Severity: high · CVSS 4 · Published 2026-09-30

pypdf is a Python library for processing PDF files. A crafted PDF with a malformed font definition can cause the library to consume excessive memory during text extraction operations, potentially leading to a denial of service. An attacker can exploit this by distributing a specially crafted PDF file that triggers the memory exhaustion when processed.

Technologies: [Py-Pdf Pypdf](https://junglewise.ai/threats/technologies/py-pdf-pypdf), [pypdf (PyPI)](https://junglewise.ai/threats/technologies/pypdf). Vendors: [Py-Pdf](https://junglewise.ai/threats/vendors/py-pdf), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-102996 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-102996 being exploited in the wild.

**How severe is CVE-2026-102996?** High severity, with a CVSS score of 4, published 30 September 2026.

**Which products and versions are affected?** Py-Pdf Pypdf before 6.18.1; pypdf (PyPI) < 6.18.1, ECOSYSTEM:introduced=0,fixed=6.18.1.

**Is there a fix for CVE-2026-102996?** Yes. pypdf (PyPI): upgrade to 6.18.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-102996 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-102996?** Check whether you run Py-Pdf Pypdf or pypdf (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- pypdf (PyPI): upgrade to 6.18.1 or later

  ```sh
  pip install "pypdf>=6.18.1"
  ```


## Technical details

The vulnerability exists in pypdf/_font.py Font._collect_tt_t1_character_widths method, which fails to properly limit the number of entries processed from a TrueType or Type1 simple font's /Widths array. A crafted PDF can include an unusually large /Widths array, causing the function to process entries beyond the 256 character codes meaningful for simple fonts, resulting in excessive memory consumption. The fix in version 6.18.1 limits the entry count to prevent this unbounded processing.

## Affected products

- py-pdf pypdf before 6.18.1

## Identifiers

- CVE-2026-102996
- GHSA-g9cg-prrw-2r8q
- PYSEC-2026-4155

## Timeline

- 2026-09-30: disclosed
- 2026-09-11: patched: fix merged in version 6.18.1

## References

- [https://github.com/py-pdf/pypdf/commit/0fb26eb8cdd01c44b3b2c9fe8329751be2f7cfd5](https://github.com/py-pdf/pypdf/commit/0fb26eb8cdd01c44b3b2c9fe8329751be2f7cfd5)
- [https://github.com/py-pdf/pypdf/pull/4072](https://github.com/py-pdf/pypdf/pull/4072)

## Related threats

- [pypdf memory exhaustion in cross-reference stream parsing](https://junglewise.ai/threats/cve-2026-119209-pypdf-is-a-free-and-open-source-pure-python-pdf-library-prior-to)
- [pypdf denial of service via forged encrypted PDF page count](https://junglewise.ai/threats/cve-2026-119208-pypdf-is-a-free-and-open-source-pure-python-pdf-library-prior-to)
- [pypdf excessive memory consumption in strict mode PDF parsing](https://junglewise.ai/threats/cve-2026-119207-pypdf-is-a-free-and-open-source-pure-python-pdf-library-prior-to)
- [pypdf denial of service via crafted page labels](https://junglewise.ai/threats/cve-2026-119206-pypdf-is-a-free-and-open-source-pure-python-pdf-library-prior-to)
- [pypdf infinite loop in DictionaryObject cloning](https://junglewise.ai/threats/cve-2026-119205-pypdf-is-a-free-and-open-source-pure-python-pdf-library-prior-to)
