# CVE-2026-71870: pypdf is a free and open-source pure-python PDF library. Prior to 6.15.0, a crafted PDF can cause large memory consumption when pypdf/_cmap.

Source: https://junglewise.ai/threats/cve-2026-71870-pypdf-uncontrolled-resource-consumption-in-tounicode-streams  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-07. Updated: 2026-08-07  
License: CC BY 4.0 with a link back

CVE-2026-71870 · Severity: medium · CVSS 4 · Published 2026-08-07

A vulnerability in the pypdf library, a tool used by developers to process and extract text from PDF files, could allow a specially crafted document to crash applications by consuming excessive memory. This could lead to service interruptions or system instability when the software attempts to process a malicious file. Organizations using this library for automated document processing should update to the latest version to prevent potential denial-of-service attacks.

Technologies: [Pypdf Project Pypdf](https://junglewise.ai/threats/technologies/pypdf-project-pypdf), [pypdf (PyPI)](https://junglewise.ai/threats/technologies/pypdf). Vendors: [Pypdf Project](https://junglewise.ai/threats/vendors/pypdf-project), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

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

**How severe is CVE-2026-71870?** Medium severity, with a CVSS score of 4, published 7 August 2026.

**Which products and versions are affected?** pypdf (PyPI) < 6.15.0, ECOSYSTEM:introduced=0,fixed=6.15.0.

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

**How is CVE-2026-71870 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-71870?** Check whether you run Pypdf Project 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.15.0 or later

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


## Technical details

A vulnerability classified as Uncontrolled Resource Consumption (CWE-400) exists in pypdf versions prior to 6.15.0. The issue occurs when the library parses the /ToUnicode entry of a font containing unusually large values, typically during text extraction processes. An attacker can exploit this by providing a maliciously crafted PDF file that, when processed, causes the application to consume excessive amounts of memory. This is a local attack requiring passive user interaction (opening or processing the file). The vulnerability has been patched in version 6.15.0.

## Affected products

- py-pdf pypdf < 6.15.0

## Identifiers

- CVE-2026-71870
- GHSA-fp3f-mc75-235c
- PYSEC-2026-3655

## Timeline

- 2026-08-06: disclosed
- 2026-08-07: advisory
- 2026-08-07: patched: Fixed in version 6.15.0

## References

- [https://api.github.com/users/stefan6419846](https://api.github.com/users/stefan6419846)
- [https://github.com/stefan6419846](https://github.com/stefan6419846)
- [https://api.github.com/users/stefan6419846/gists%7B/gist_id%7D](https://api.github.com/users/stefan6419846/gists%7B/gist_id%7D)
- [https://api.github.com/users/stefan6419846/repos](https://api.github.com/users/stefan6419846/repos)
- [https://avatars.githubusercontent.com/u/96178532?v=4](https://avatars.githubusercontent.com/u/96178532?v=4)
- [https://api.github.com/users/stefan6419846/events%7B/privacy%7D](https://api.github.com/users/stefan6419846/events%7B/privacy%7D)

## 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)
