Moderate severityNVD Advisory· Published Mar 10, 2026· Updated Mar 11, 2026
pypdf: manipulated stream length values can exhaust RAM
CVE-2026-31826
Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.8.0, an attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires parsing a content stream with a rather large /Length value, regardless of the actual data length inside the stream. This vulnerability is fixed in 6.8.0.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
pypdfPyPI | < 6.8.0 | 6.8.0 |
Affected products
9- osv-coords8 versionspkg:apk/chainguard/litellmpkg:apk/chainguard/nemopkg:apk/chainguard/open-webuipkg:apk/wolfi/open-webuipkg:pypi/pypdfpkg:rpm/opensuse/python-PyPDF2&distro=openSUSE%20Leap%2016.0pkg:rpm/opensuse/python-PyPDF2&distro=openSUSE%20Tumbleweedpkg:rpm/opensuse/python-pypdf&distro=openSUSE%20Tumbleweed
< 1.81.14-r1+ 7 more
- (no CPE)range: < 1.81.14-r1
- (no CPE)range: < 2.7.0-r2
- (no CPE)range: < 0.8.10-r1
- (no CPE)range: < 0.8.10-r1
- (no CPE)range: < 6.8.0
- (no CPE)range: < 2.11.1-bp160.4.1
- (no CPE)range: < 2.11.1-7.1
- (no CPE)range: < 6.8.0-1.1
Patches
Vulnerability mechanics
References
6- github.com/advisories/GHSA-hqmh-ppp3-xvm7ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-31826ghsaADVISORY
- github.com/py-pdf/pypdf/commit/3c550b3196adeba1506a26e57c09c09fac75e9aaghsaWEB
- github.com/py-pdf/pypdf/pull/3675ghsax_refsource_MISCWEB
- github.com/py-pdf/pypdf/releases/tag/6.8.0ghsax_refsource_MISCWEB
- github.com/py-pdf/pypdf/security/advisories/GHSA-hqmh-ppp3-xvm7ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.