CVE-2026-119206: pypdf has possible long runtimes when retrieving page labels
Retrieving page labels from a crafted PDF can take a very long time in pypdf before 6.21.3. The result is a stalled Python process, not code execution or data loss. Any service that reads page labels from untrusted PDFs is affected. Upgrade to pypdf 6.21.3.
Published Oct 30, 2026 · Analysis Oct 31, 2026
What an attacker can do
The advisory is brief: a crafted PDF leads to large runtimes, and the trigger is retrieving the page labels of the file (CWE-400). Page labels are the display numbers a viewer shows, such as roman numerals for front matter. The advisory does not describe the exact structure that causes the slowdown, and the 6.21.3 release notes do not list a separate page-label entry, so the mechanism is not spelled out in the sources I read.
The attacker only has to get a PDF to code that asks pypdf for page labels. That could be an upload handler, a document indexer or a viewer backend. The CVSS 4.0 vector shows no privileges required, passive user interaction and high availability impact only.
A single request can occupy a worker for a long time. With few workers, or a synchronous handler, a handful of files can make the service unresponsive. Nothing in the advisory suggests data exposure.
Who is affected
All pypdf releases below 6.21.3, for code that retrieves page labels. Check the installed version with:
pip show pypdfSearch your code for use of the page labels property on a reader object to see whether untrusted files reach it. Check indirect dependencies too.
pypdf
- Ecosystem
- PyPI
- Affected
- < 6.21.3
- Fixed in
- 6.21.3
- Check
pip show pypdf
How to fix it
Upgrade to pypdf 6.21.3:
pip install --upgrade "pypdf>=6.21.3"If you cannot upgrade yet, the maintainers suggest applying the changes from pull request 4251. Running PDF parsing in a child process with a time limit also contains the damage.
How to tell if you were hit
Look for requests or jobs that time out only on particular PDFs, and workers that stay busy at high CPU while in a page-label call. Keep the offending files. The advisory lists no log line or network indicator, and no report of exploitation.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
An attacker who uses this vulnerability can craft a PDF which leads to large runtimes. This requires retrieving the page labels of a file.
Patches
This has been fixed in pypdf==6.21.3.
Workarounds
If you cannot upgrade yet, consider applying the changes from PR #4251.
Credited to rozzkml, kholdrex.
Questions
- Does CVE-2026-119206 affect reading text from a PDF?
The advisory names retrieving page labels as the trigger. Code that never calls that feature is not described as affected, but upgrading is still advised.
- Which version fixes it?
pypdf 6.21.3. Anything older is vulnerable.
- Who reported it?
The advisory credits rozzkml and kholdrex.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-119203
pypdf has possible infinite loop when hitting EOF in standard xref table during trailer search
high7.1Oct 30, 2026CVE-2026-119204
pypdf has possible large memory usage when parsing page tree
high7.1Oct 30, 2026CVE-2026-119205
pypdf has possible infinite loop when cloning dictionaries
high7.1Oct 30, 2026CVE-2026-119207
pypdf has possible large memory usage for exceptions in strict mode
high7.1Oct 30, 2026CVE-2026-119208
pypdf has possible long runtimes/large memory usage for encrypted PDF files
high7.1Oct 30, 2026CVE-2026-119209
pypdf has possible large memory usage when parsing cross-reference streams
high7.1Oct 30, 2026
