CVE-2026-113786: pypdf: Unvalidated JPEG image data loading

Published Oct 21, 2026
·
Updated

Impact

An attacker who uses this vulnerability can craft a PDF which leads to arbitrary image parsers being called. This requires loading an image which claims to use the /DCTDecode filter (JPEG data).

Users which do not have the optional Pillow dependency installed in their environment are not affected.

Patches

This has been fixed in pypdf==6.21.1.

Workarounds

If you cannot upgrade yet, consider applying the changes from PR #4222.

Other sources

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.

— Ubuntu

Affected Software

12 affected componentsFixes available
pypi/pypdf<6.21.1
pip/pypdf<6.21.1
6.21.1
ubuntu/pypdf2*
ubuntu/pypdf2*
ubuntu/pypdf2*
ubuntu/pypdf2*
ubuntu/pypdf*
ubuntu/pypdf2*
ubuntu/pypdf*
ubuntu/pypdf*
debian/pypdf<=3.4.1-1+deb12u1, <=5.4.0-1
6.21.1-1
debian/pypdf2<=2.12.1-3+deb12u1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/pypdf to a version that resolves this vulnerability.

    Fixed in 6.21.1
  2. Upgrade

    Upgrade debian/pypdf to a version that resolves this vulnerability.

    Fixed in 6.21.1-1
  3. Upgrade

    Upgrade pypdf to a version that resolves this vulnerability.

    Fixed in 6.21.1

Event History

Oct 21, 2026
CVE Published
via Ubuntu·12:00 AM
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
CVE Published
via MITRE·02:38 PM
Data Sourced
via MITRE·02:38 PM
DescriptionWeakness
Data Sourced
via OSV·02:38 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:17 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·07:58 PM
Data Sourced
via GitHub·07:58 PM
DescriptionWeaknessAffected Software
Oct 28, 2026
Data Sourced
via OSV·08:17 PM
Affected Software

Frequently Asked Questions

1

Which deployments are affected?

Only pypdf environments that have the optional Pillow dependency installed are affected. Environments without Pillow are not affected.

2

What does an attacker need to exploit this issue?

An attacker needs to provide a crafted PDF containing image data labeled with the /DCTDecode filter and have that image loaded by the affected environment.

3

What remediation is available?

Upgrade pypdf to version 6.21.1, which fixes the issue.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203