CVE-2026-31826
pypdf: manipulated stream length values can exhaust RAM
EPSS 0.17%
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.
How to fix CVE-2026-31826
To remediate CVE-2026-31826, upgrade the affected package to a fixed version below.
- PyPI/pypdf—upgrade to 6.8.0 or later
- PyPI/pypdf—upgrade to 6.8.0 or later
Is CVE-2026-31826 being exploited?
Low — EPSS is 0.2%, meaning exploitation activity has not been observed at scale.
Affected packages (2)
- from 0, < 6.8.0
- from 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 |