---
id: CVE-2026-113786
title: 'pypdf: Unvalidated JPEG image data loading'
summary: >-
  pypdf is a free and open-source pure-python PDF library. Prior to 6.21.1, an
  attacker can craft a PDF containing image data labeled with the /DCTDecode
  filter that causes Pillow to select and invoke an unintended image parser when
  the im…
severity: low
cvss: 2.3
cvssVector: 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N'
cvssSource: cna
cwe:
  - CWE-20
  - CWE-183
vendor: py-pdf
product: pypdf
affected:
  - pypdf < 6.21.1
published: '2026-10-21'
updated: '2026-10-21'
sourceUpdated: '2026-10-21T14:38:39.617Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-113786'
references:
  - url: 'https://github.com/py-pdf/pypdf/security/advisories/GHSA-5hx5-vpf9-5wcv'
    label: 'https://github.com/py-pdf/pypdf/security/advisories/GHSA-5hx5-vpf9-5wcv'
  - url: 'https://github.com/py-pdf/pypdf/pull/4222'
    label: 'https://github.com/py-pdf/pypdf/pull/4222'
  - url: >-
      https://github.com/py-pdf/pypdf/commit/512d8eb94eb04be1d1c90504e6da2dcef8679e07
    label: >-
      https://github.com/py-pdf/pypdf/commit/512d8eb94eb04be1d1c90504e6da2dcef8679e07
  - url: 'https://github.com/py-pdf/pypdf/releases/tag/6.21.1'
    label: 'https://github.com/py-pdf/pypdf/releases/tag/6.21.1'
tags:
  - cve.org
ingestedAt: '2026-10-21T15:02:42.099Z'
---

## Overview

pypdf is a free and open-source pure-python PDF library. Prior to 6.21.1, an attacker can craft a PDF containing image data labeled with the /DCTDecode filter that causes Pillow to select and invoke an unintended image parser when the image is loaded. Environments without the optional Pillow dependency are not affected. This issue is fixed in version 6.21.1.

## Affected

- `pypdf < 6.21.1`

## Remediation

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