{"id":"CVE-2026-113791","kind":"vulnerability","aliases":["CVE-2026-113791","GHSA-cgf9-327m-v77c"],"related":[],"title":"pypdf: Possible large memory usage when parsing content streams","description":"### Impact\n\nAn attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires parsing content streams with many small operations.\n\n### Patches\n\nThis has been fixed in [pypdf==6.21.0](https://github.com/py-pdf/pypdf/releases/tag/6.21.0).\n\n### Workarounds\n\nIf you cannot upgrade yet, consider applying the changes from PR [#4218](https://github.com/py-pdf/pypdf/pull/4218).","summary":"pypdf, a Python PDF library, uses large amounts of memory when parsing PDF content streams with many small operations. An attacker who supplies a crafted PDF can exhaust memory in the process that parses it, causing slowdown or a crash.","severity":"medium","cvss":6.0,"epss":0.003169999923557043,"exploited":false,"exploited_at":null,"products":[{"name":"pypdf","fixed":["6.21.0"],"affected":"< 6.21.0","ecosystem":"pypi"}],"ecosystems":["pypi"],"tags":["cwe-400","cwe-770","document-processing","package","pypdf","python"],"not_affected_if":["pypdf-not-installed","untrusted-pdf-input-absent"],"how_to_check":"Run pip show pypdf or check the lockfile for the installed pypdf version; anything below 6.21.0 is affected.","fix":"Upgrade pypdf to 6.21.0 or later. If you cannot upgrade yet, apply the changes from PR #4218 in the pypdf repository.","status":"open","published_at":"2026-10-21T16:17:27+00:00","first_seen_at":"2026-10-23T19:11:31+00:00","triaged_at":"2026-10-23T20:06:37+00:00","updated_at":"2026-10-23T21:57:29+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-23T20:06:37Z","model":"claude-haiku-5-5","output":{"fix":"Upgrade pypdf to 6.21.0 or later. If you cannot upgrade yet, apply the changes from PR #4218 in the pypdf repository.","summary":"pypdf, a Python PDF library, uses large amounts of memory when parsing PDF content streams with many small operations. An attacker who supplies a crafted PDF can exhaust memory in the process that parses it, causing slowdown or a crash.","category":"package","who_cares":["python","pypdf","document-processing"],"confidence":0.8,"analyst_note":"","how_to_check":"Run pip show pypdf or check the lockfile for the installed pypdf version; anything below 6.21.0 is affected.","needs_analyst":false,"not_affected_if":["pypdf-not-installed","untrusted-pdf-input-absent"],"severity_if_unknown":"medium"},"cost_usd":0.000358,"input_tokens":2114,"output_tokens":293,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-113791':12A,20A '-2026':11A,19A '-400':23B '-770':25B '/py-pdf/pypdf/pull/4218).':124C '/py-pdf/pypdf/releases/tag/6.21.0).':108C '327m':16A '4218':121C '6.21.0':105C 'amount':39B 'appli':116C 'attack':52B,74C 'cannot':112C 'caus':67B 'cgf9':15A 'chang':118C 'consid':115C 'content':8A,45B,92C 'craft':56B,80C 'crash':71B 'cve':10A,18A 'cwe':22B,24B 'document':27B 'document-process':26B 'exhaust':59B 'fix':102C 'ghsa':14A 'ghsa-cgf9-327m-v77c':13A 'github.com':107C,123C 'github.com/py-pdf/pypdf/pull/4218).':122C 'github.com/py-pdf/pypdf/releases/tag/6.21.0).':106C 'impact':72C 'larg':3A,38B,86C 'lead':84C 'librari':36B 'mani':48B,95C 'memori':4A,41B,60B,87C 'oper':50B,97C 'packag':29B 'pars':7A,43B,65B,91C 'patch':98C 'pdf':35B,44B,57B,82C 'possibl':2A 'pr':120C 'process':28B,63B 'pypdf':1A,21A,30B,32B,104C 'python':31B,34B 'requir':90C 'slowdown':68B 'small':49B,96C 'stream':9A,46B,93C 'suppli':54B 'upgrad':113C 'usag':5A,88C 'use':37B,76C 'v77c':17A 'vulner':78C 'workaround':109C 'yet':114C","nicknames":[],"mitigations":[],"who_affected":null,"tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-21T16:17:27+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:P/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","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-cgf9-327m-v77c","url":"https://github.com/advisories/GHSA-cgf9-327m-v77c","severity":"medium","published_at":"2026-10-22T16:49:22+00:00","modified_at":"2026-10-22T16:49:24+00:00","first_seen_at":"2026-10-23T19:11:31+00:00","fetched_at":"2026-10-23T19:11:31+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-113791","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-113791","severity":null,"published_at":"2026-10-21T16:17:27+00:00","modified_at":"2026-10-22T16:46:48+00:00","first_seen_at":"2026-10-23T21:57:29+00:00","fetched_at":"2026-10-23T22:29:01+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}