CVE-2023-36810 Quadratic runtime with malformed PDF missing xref marker in pypdf
An attacker can cause a denial of service by crafting a malformed PDF that triggers quadratic runtime in the pypdf library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-36810?
CVE-2023-36810 is a medium-severity denial of service vulnerability in Pypdf Project Pypdf, published on 30 Jun 2023. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
pypdf is a pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. An attacker who uses this vulnerability can craft a PDF which leads to unexpected long runtime. This quadratic runtime blocks the current process and can utilize a single core of the CPU by 100%. It does not affect memory usage. This issue has been addressed in PR 808 and versions from 1.27.9 include this fix. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Weakness: CWE-407
Which versions are affected by CVE-2023-36810?
3 open source packages ship an affected version, including pypdf2 and PyPDF2. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pypdf2 PyPI | All versions | 1.27.9 |
pypdf2 PyPI | All versions | 1.27.9 |
PyPDF2 PyPI | All versions | 1.27.9 |
Products include Pypdf Project Pypdf.
How do I fix CVE-2023-36810?
Upgrade pypdf2 to 1.27.9 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2023-36810 being exploited?
There is no known exploitation of CVE-2023-36810 in the wild and no public exploit code.
Other vulnerabilities in Pypdf Project Pypdf
- CVE-2026-102993 pypdf: Possible large memory usage when retrieving Roman page labels
- CVE-2026-102994 pypdf: Possible long runtimes/large memory usage when parsing indirect objects
- CVE-2026-102995 pypdf: Possible large memory usage for large /ToUnicode streams (Follow-up 2)
- CVE-2026-102996 pypdf: Possible large memory usage when parsing font data
- CVE-2026-102997 pypdf: Possible long runtimes for partially malformed FlateDecode streams (Follow-up)
Sources
Also known as DEBIAN-CVE-2023-36810, DLA-3497-1, GHSA-jrm6-h9cq-8gqw, MGASA-2023-0254, PYSEC-2026-1837, UBUNTU-CVE-2023-36810 and 1 more.