CVE-2026-31826: pypdf: manipulated stream length values can exhaust RAM
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.
References
- github.com/advisories/GHSA-hqmh-ppp3-xvm7
- github.com/py-pdf/pypdf
- github.com/py-pdf/pypdf/commit/3c550b3196adeba1506a26e57c09c09fac75e9aa
- github.com/py-pdf/pypdf/pull/3675
- github.com/py-pdf/pypdf/releases/tag/6.8.0
- github.com/py-pdf/pypdf/security/advisories/GHSA-hqmh-ppp3-xvm7
- nvd.nist.gov/vuln/detail/CVE-2026-31826
Code Behaviors & Features
Detect and mitigate CVE-2026-31826 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →