CVE-2026-31826
published 2026-03-10CVE-2026-31826: 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…
PriorityP421medium5.5CVSS 3.1
AVLACLPRNUIRSUCNINAH
EPSS
0.17%
6.8th percentile
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
6 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | pypdf | < pypdf 6.9.0-1 (forky) | pypdf 6.9.0-1 (forky) |
| debian | pypdf2 | < pypdf 6.9.0-1 (forky) | pypdf 6.9.0-1 (forky) |
| py-pdf | pypdf | < 6.8.0 | 6.8.0 |
| pypdf_project | pypdf | < 6.8.0 | 6.8.0 |
| pypdf_project | pypdf | >= 0 < 6.9.0-1 | 6.9.0-1 |
| pypdf_project | pypdf | >= 0 < 6.8.0 | 6.8.0 |
CVSS provenance
nvdv3.15.5MEDIUMCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
nvdv4.06.8MEDIUMCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
osv6.8MEDIUM
vendor_debian6.8MEDIUM
vendor_redhat6.8MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
pypdf: manipulated stream length values can exhaust RAM
osv·2026-03-11
CVE-2026-31826 [MEDIUM] pypdf: manipulated stream length values can exhaust RAM
pypdf: manipulated stream length values can exhaust RAM
### Impact
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.
### Patches
This has been fixed in [pypdf==6.8.0](https://github.com/py-pdf/pypdf/releases/tag/6.8.0).
### Workarounds
If you cannot upgrade yet, consider applying the changes from PR [#3675](https://github.com/py-pdf/pypdf/pull/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.
GHSA
pypdf: manipulated stream length values can exhaust RAM
ghsa·2026-03-11
CVE-2026-31826 [MEDIUM] CWE-770 pypdf: manipulated stream length values can exhaust RAM
pypdf: manipulated stream length values can exhaust RAM
### Impact
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.
### Patches
This has been fixed in [pypdf==6.8.0](https://github.com/py-pdf/pypdf/releases/tag/6.8.0).
### Workarounds
If you cannot upgrade yet, consider applying the changes from PR [#3675](https://github.com/py-pdf/pypdf/pull/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.
OSV
CVE-2026-31826: pypdf is a free and open-source pure-python PDF library
osv·2026-03-10·CVSS 6.8
CVE-2026-31826 [MEDIUM] CVE-2026-31826: pypdf is a free and open-source pure-python PDF library
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.
Red Hat
pypdf: pypdf: Denial of Service due to excessive memory consumption via crafted PDF
vendor_redhat·2026-03-10·CVSS 6.8
CVE-2026-31826 [MEDIUM] CWE-770 pypdf: pypdf: Denial of Service due to excessive memory consumption via crafted PDF
pypdf: pypdf: Denial of Service due to excessive memory consumption via crafted PDF
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.
A flaw was found in pypdf, a pure-Python PDF library. An attacker can craft a malicious PDF file containing a content stream with an intentionally large /Length value. When this PDF is parsed, it can lead to excessive memory consumption, resulting in a Denial of Service (DoS) condition due to resource exhaustion.
Mitigation: Mitigation for this issue is either not available or t
Debian
CVE-2026-31826: pypdf - pypdf is a free and open-source pure-python PDF library. Prior to 6.8.0, an atta...
vendor_debian·2026·CVSS 6.8
CVE-2026-31826 [MEDIUM] CVE-2026-31826: pypdf - pypdf is a free and open-source pure-python PDF library. Prior to 6.8.0, an atta...
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.
Scope: local
bookworm: open
forky: resolved (fixed in 6.9.0-1)
sid: resolved (fixed in 6.9.0-1)
trixie: open
No detection rules found.
No public exploits indexed.
2026-03-10
Published