CVE-2026-59938: pypdf: Possible large memory usage for wrong image dimensions

Published Jul 8, 2026
·
Updated

Impact

An attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires loading images where the declared size values are much too large compared to the actual data.

Patches

This has been fixed in pypdf==6.14.0.

Workarounds

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

Other sources

pypdf is a free and open-source pure-python PDF library. Prior to 6.14.0, an attacker can craft a PDF with declared image size values that are much too large compared to the actual data, causing large memory usage in pypdf image parsing. This issue is fixed in version 6.14.0.

MITRE

Affected Software

3 affected componentsFixes available
pypi/pypdf<6.14.0
Pypdf Project Pypdf<6.14.0
pip/pypdf<6.14.0
6.14.0

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.14.0
  2. Upgrade

    Upgrade pypdf to a version that resolves this vulnerability.

    Fixed in 6.14.0
  3. Compensating control

    If you cannot upgrade yet, apply the workaround changes from PR [#3888] for pypdf image parsing to prevent large memory usage from PDFs with declared image dimensions that are much too large compared to the actual data.

Event History

Jul 8, 2026
CVE Published
via MITRE·05:24 PM
Data Sourced
via MITRE·05:24 PM
DescriptionWeakness
Data Sourced
via NVD·06:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 23, 2026
Advisory Published
via GitHub·03:06 PM
Data Sourced
via GitHub·03:06 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-59938?

CVE-2026-59938 has a risk score of 28, indicating it has the potential for significant impact.

2

How do I fix CVE-2026-59938?

To fix CVE-2026-59938, upgrade to pypdf version 6.14.0 or later.

3

What types of attacks can exploit CVE-2026-59938?

CVE-2026-59938 can be exploited by crafting a PDF with unrealistic image size declarations leading to excessive memory usage.

4

In which versions is CVE-2026-59938 present?

CVE-2026-59938 is present in pypdf versions prior to 6.14.0.

5

What is pypdf in relation to CVE-2026-59938?

pypdf is a pure-Python PDF library that has a vulnerability allowing for large memory usage due to improper image size handling.

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