CVE-2026-31826
MEDIUM5.5EPSS 0.01%pypdf: manipulated stream length values can exhaust RAM
Published: 3/11/2026Modified: 4/28/2026
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.
Affected packages (3)
- Debian/pypdffrom 0
- Debian/pypdf2from 0
- PyPI/pypdffrom 0, < 6.8.0
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 4.0 | — | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| osv | CVSS 3.1 | MEDIUM5.5 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
References (7)
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2026-31826
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2026-31826
- PATCHhttps://github.com/py-pdf/pypdf
- WEBhttps://github.com/py-pdf/pypdf/commit/3c550b3196adeba1506a26e57c09c09fac75e9aa
- WEBhttps://github.com/py-pdf/pypdf/pull/3675
- WEBhttps://github.com/py-pdf/pypdf/releases/tag/6.8.0
- WEBhttps://github.com/py-pdf/pypdf/security/advisories/GHSA-hqmh-ppp3-xvm7