---
id: CVE-2026-113794
title: 'pypdf: Possible infinite loop when hitting EOF in standard xref table'
summary: >-
  pypdf is a free and open-source pure-python PDF library. Prior to 6.20.0, an
  attacker can craft an incomplete PDF that ends inside a standard
  cross-reference table, causing pypdf to mishandle the unexpected end of file
  and enter an infin…
severity: medium
cvss: 6
cvssVector: 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'
cvssSource: cna
cwe:
  - CWE-835
vendor: py-pdf
product: pypdf
affected:
  - pypdf < 6.20.0
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-10-28T01:20:32.593442Z'
published: '2026-10-21'
updated: '2026-10-28'
sourceUpdated: '2026-10-28T01:20:41.647Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-113794'
references:
  - url: 'https://github.com/py-pdf/pypdf/security/advisories/GHSA-39mj-jf6j-2qj3'
    label: 'https://github.com/py-pdf/pypdf/security/advisories/GHSA-39mj-jf6j-2qj3'
  - url: 'https://github.com/py-pdf/pypdf/issues/4169'
    label: 'https://github.com/py-pdf/pypdf/issues/4169'
  - url: 'https://github.com/py-pdf/pypdf/pull/4170'
    label: 'https://github.com/py-pdf/pypdf/pull/4170'
  - url: >-
      https://github.com/py-pdf/pypdf/commit/37e1cd681744bac38b159f7e1c614eee8d639c58
    label: >-
      https://github.com/py-pdf/pypdf/commit/37e1cd681744bac38b159f7e1c614eee8d639c58
  - url: 'https://github.com/py-pdf/pypdf/releases/tag/6.20.0'
    label: 'https://github.com/py-pdf/pypdf/releases/tag/6.20.0'
  - url: 'https://github.com/py-pdf/pypdf'
  - url: 'https://github.com/advisories/GHSA-39mj-jf6j-2qj3'
tags:
  - cve.org
  - osv
  - pip
  - ghsa
epss: 0.00466
epssPercentile: 0.40151
aliases:
  - GHSA-39mj-jf6j-2qj3
ecosystem: pip
patched:
  - pypdf 6.20.0
ingestedAt: '2026-10-21T16:05:17.682Z'
---

## Overview

pypdf is a free and open-source pure-python PDF library. Prior to 6.20.0, an attacker can craft an incomplete PDF that ends inside a standard cross-reference table, causing pypdf to mishandle the unexpected end of file and enter an infinite loop. This issue is fixed in version 6.20.0.

## Affected

- `pypdf < 6.20.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-113794)

Affected packages:

- `pypdf < 6.20.0`

Patched in:

- `pypdf 6.20.0`

Source: https://osv.dev/vulnerability/GHSA-39mj-jf6j-2qj3
