CVE-2026-31826Medium▾ Sunlitpypdf: manipulated stream length values can exhaust RAM
▾ Sunlit zone — Low / medium · no exploitation signal
impact 27.5 · likelihood 0 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Jul 13.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
0.2%
Last analysed / modified upstream
0.2% → 0.2%
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 has been fixed in pypdf==6.8.0.
If you cannot upgrade yet, consider applying the changes from PR #3675.
As far as we are aware, this mostly affects reading from buffers of unknown size, as returned by open("file.pdf", mode="rb") for example. Passing a file path or a BytesIO buffer to pypdf instead does not seem to trigger the vulnerability.
pypdf < 6.8.0Upgrade to a patched release:
pypdf 6.8.0Connected by shared product, vendor, weakness, or advisory.
CVE-2026-82398Medium· 5.3pypdf is a free and open-source pure-python PDF library
CVE-2026-84309Medium· 5.5pypdf is a free and open-source pure-python PDF library
CVE-2026-84311Medium· 5.5pypdf is a free and open-source pure-python PDF library
CVE-2026-84310Medium· 5.5pypdf is a free and open-source pure-python PDF library
CVE-2026-71870Mediumpypdf is a free and open-source pure-python PDF library
CVE-2026-71852Mediumpypdf is a free and open-source pure-python PDF library