CVE-2026-113791: pypdf: Possible large memory usage when parsing content streams

Published Oct 21, 2026
·
Updated

Impact

An attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires parsing content streams with many small operations.

Patches

This has been fixed in pypdf==6.21.0.

Workarounds

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

Other sources

pypdf is a free and open-source pure-python PDF library. Prior to 6.21.0, an attacker can craft a PDF containing a content stream with many small operations, causing parsing to consume large amounts of memory. This issue is fixed in version 6.21.0.

— Ubuntu

Affected Software

17 affected componentsFixes available
pypi/pypdf<6.21.0
pip/pypdf<6.21.0
6.21.0
ubuntu/pypdf2*
ubuntu/pypdf2*
ubuntu/pypdf2*
ubuntu/pypdf2*
ubuntu/pypdf*
ubuntu/pypdf2*
ubuntu/pypdf*
ubuntu/pypdf*
py-pdf Pypdf Python<6.21.0
debian/pypdf*
debian/pypdf*
debian/pypdf<6.21.0-1
6.21.0-1
debian/pypdf2*
debian/pypdf<=3.4.1-1+deb12u1, <=5.4.0-1
6.21.4-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.0
  2. Upgrade

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

    Fixed in 6.21.0-1
  3. Upgrade

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

    Fixed in 6.21.4-1
  4. Upgrade

    Upgrade pypdf to a version that resolves this vulnerability.

    Fixed in 6.21.0

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·03:37 PM
Data Sourced
via MITRE·03:37 PM
DescriptionWeakness
Data Sourced
via OSV·03:37 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:17 PM
DescriptionSeverityWeakness
Oct 22, 2026
Advisory Published
via GitHub·04:49 PM
Data Sourced
via GitHub·04:49 PM
DescriptionWeaknessAffected Software
Nov 5, 2026
Data Sourced
via NVD·09:33 PM
RemedyAffected Software
Nov 7, 2026
Data Sourced
via OSV·01:45 AM
Affected Software

Frequently Asked Questions

1

Who can trigger the excessive memory use?

An attacker who can provide a crafted PDF that your application parses with pypdf can trigger it. The PDF uses a content stream containing many small operations.

2

Which pypdf versions need remediation?

Versions prior to 6.21.0 are affected. Upgrade to version 6.21.0 or later to obtain the fix.

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