{"id":"CVE-2026-31826","published":"2026-03-10T21:36:52Z","modified":"2026-03-11T15:59:26Z","title":"pypdf: manipulated stream length values can exhaust RAM","vendor":"py-pdf","product":"pypdf","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.8,"severity":"MEDIUM","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00213,"percentile":0.06634,"provenance":"source"},"cwes":[{"id":"CWE-770","name":"Allocation of Resources Without Limits or Throttling"}],"references":[{"url":"https://github.com/py-pdf/pypdf/security/advisories/GHSA-hqmh-ppp3-xvm7","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/py-pdf/pypdf/pull/3675","tags":["x_refsource_MISC"]},{"url":"https://github.com/py-pdf/pypdf/releases/tag/6.8.0","tags":["x_refsource_MISC"]}],"priority":{"score":6.1,"factors":[{"name":"EPSS percentile","points":1.33},{"name":"CVSS severity","points":4.76}]},"vendorSlug":"py-pdf","affectedVersions":[{"vendor":"py-pdf","product":"pypdf","versions":["< 6.8.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-03-11T15:51:55.234665Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"pypdf","vulnerableRanges":["<6.8.0"],"patched":["6.8.0"],"from":["GHSA-hqmh-ppp3-xvm7","PYSEC-2026-3019"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-10924","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-py-pdf-pypdf-cve-2023-46250","children":[{"from":"CVE-2026-31826","to":"CVE-2026-113790","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["pypdf/generic/_data_structures.py"],"commits":["https://github.com/py-pdf/pypdf/commit/18bd2981a74479483a0b9507602c58a63d6c9b12","https://github.com/py-pdf/pypdf/commit/3c550b3196adeba1506a26e57c09c09fac75e9aa"],"basis":"shared function","functions":["read_from_stream"]}]},{"from":"CVE-2026-31826","to":"CVE-2026-113791","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["pypdf/generic/_data_structures.py"],"commits":["https://github.com/py-pdf/pypdf/commit/18bd2981a74479483a0b9507602c58a63d6c9b12","https://github.com/py-pdf/pypdf/commit/3c550b3196adeba1506a26e57c09c09fac75e9aa"],"basis":"shared function","functions":["read_from_stream"]}]},{"from":"CVE-2026-31826","to":"CVE-2026-119207","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["pypdf/generic/_data_structures.py"],"commits":["https://github.com/py-pdf/pypdf/commit/64270258c0eced720f7960aecf8cef31afd39f8d","https://github.com/py-pdf/pypdf/commit/3c550b3196adeba1506a26e57c09c09fac75e9aa"],"basis":"shared function","functions":["read_from_stream"]}]}],"packageHistory":[{"cve":"CVE-2026-27888","published":"2026-02-26","fixed":"6.7.3","kev":false},{"cve":"CVE-2026-28351","published":"2026-02-27","fixed":"6.7.4","kev":false},{"cve":"CVE-2026-28804","published":"2026-03-06","fixed":"6.7.5","kev":false,"link":{"from":"CVE-2026-28804","to":"CVE-2026-31826","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:pypdf","fromFixed":"6.7.5","toFixed":"6.8.0","daysApart":4},{"kind":"same-code","provenance":"machine","files":["pypdf/filters.py"],"commits":["https://github.com/py-pdf/pypdf/commit/648c627d2657447dfb1773412af05a0a5103b98f","https://github.com/py-pdf/pypdf/commit/3c550b3196adeba1506a26e57c09c09fac75e9aa"],"basis":"shared file"}]}},{"cve":"CVE-2026-31826","published":"2026-03-10","fixed":"6.8.0","kev":false},{"cve":"CVE-2026-33123","published":"2026-03-20","fixed":"6.9.1","kev":false,"link":{"from":"CVE-2026-31826","to":"CVE-2026-33123","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:pypdf","fromFixed":"6.8.0","toFixed":"6.9.1","daysApart":10}]}},{"cve":"CVE-2026-33699","published":"2026-03-26","fixed":"6.9.2","kev":false},{"cve":"CVE-2026-40260","published":"2026-04-16","fixed":"6.10.0","kev":false}],"package":"PyPI:pypdf"}}