CVE-2023-36810 Quadratic runtime with malformed PDF missing xref marker in pypdf

Medium 6.2 Published Updated

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.

PackageAffectedFixed in
pypdf2 PyPIAll versions1.27.9
pypdf2 PyPIAll versions1.27.9
PyPDF2 PyPIAll versions1.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.

All Pypdf Project Pypdf vulnerabilities

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.

Is CVE-2023-36810 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free