{"schemaVersion":3,"id":"CVE-2022-24859","aliases":["MGASA-2022-0224","openSUSE-SU-2024:0366-1","GHSA-xcjx-m2pj-8g79","PYSEC-2022-194","UBUNTU-CVE-2022-24859","USN-6176-1","DEBIAN-CVE-2022-24859","DLA-3039-1","DLA-3451-1"],"status":"published","duplicateOf":null,"title":null,"description":"PyPDF2 is an open source python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. In versions prior to 1.27.5 an attacker who uses this vulnerability can craft a PDF which leads to an infinite loop if the PyPDF2 if the code attempts to get the content stream. The reason is that the last while-loop in `ContentStream._readInlineImage` only terminates when it finds the `EI` token, but never actually checks if the stream has already ended. This issue has been resolved in version `1.27.5`. Users unable to upgrade should validate and PDFs prior to iterating over their content stream.","dates":{"published":"2022-04-18T00:00:00.000Z","modified":"2025-04-22T18:15:17.460Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":6.2,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":6.2,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Pypi","score":6.9,"severity":"medium","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Pypi","score":6.2,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":6.4,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":6.2,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":6.4,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":5.5,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","exploitability":4.6,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":5.5,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":4.3,"severity":"medium","vector":"AV:N/AC:M/Au:N/C:N/I:N/A:P","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.01317,"percentile":0.70385,"severity":"low","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.01317},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.01317,"percentile":0.70385}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01317,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.01317,"percentile":0.70385}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"GITHUB_PY-PDF_PYPDF2","name":"Pypdf2","source":"github","url":"https://github.com/py-pdf/PyPDF2/security/advisories/GHSA-xcjx-m2pj-8g79","maturity":"poc","reliabilityScore":0.3,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-835","name":"Loop with Unreachable Exit Condition ('Infinite Loop')","description":"The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.","type":"weakness","status":"Incomplete","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/835.html"}],"affected":[{"vendor":"debian","product":"pypdf2","name":"pypdf2","label":"pypdf2","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/pypdf2","purlType":"deb","versions":[{"text":"< 1.26.0-2+deb9u1","noFixRecorded":false,"fixedIn":null},{"text":"< 1.26.0-2+deb10u1","noFixRecorded":false,"fixedIn":null},{"text":"< 1.27.9-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.26.0-2+deb9u1 | < 1.26.0-2+deb10u1 | < 1.27.9-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"pypdf2","name":"pypdf2","label":"pypdf2","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/pypdf2","purlType":"deb","versions":[{"text":"< 1.25.1-1ubuntu0.1~esm1","noFixRecorded":false,"fixedIn":null},{"text":"< 1.26.0-2ubuntu0.1~esm1","noFixRecorded":false,"fixedIn":null},{"text":"< 1.26.0-3ubuntu1.20.04.1","noFixRecorded":false,"fixedIn":null},{"text":"< 1.26.0-4ubuntu0.22.04.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.25.1-1ubuntu0.1~esm1 | < 1.26.0-2ubuntu0.1~esm1 | < 1.26.0-3ubuntu1.20.04.1 | < 1.26.0-4ubuntu0.22.04.1","eol":null,"hubHref":null},{"vendor":"debian","product":"debian_linux","name":"debian linux","label":"debian_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"9.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"9.0","eol":{"isEol":true,"eolDate":"2022-07-01T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"9","label":"9 (Stretch)","eolFrom":"2022-07-01T00:00:00.000Z","isLts":false,"isMaintained":true,"latestVersion":"9.13"},"product":{"name":"debian","label":"Debian","category":"os"}},"hubHref":"/vendor/debian/debian_linux"},{"vendor":"mageia","product":"python-pypdf2","name":"python-pypdf2","label":"python-pypdf2","ecosystem":"Mageia","cpePart":null,"purl":"pkg:rpm/mageia/python-pypdf2","purlType":"rpm","versions":[{"text":"< 1.27.5-1.mga8","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.27.5-1.mga8","eol":null,"hubHref":null},{"vendor":"py-pdf","product":"pypdf2","name":"PyPDF2","label":"pypdf2","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 1.27.5","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.27.5","eol":null,"hubHref":"/vendor/py-pdf/pypdf2"},{"vendor":"pypdf2_project","product":"pypdf2","name":"pypdf2","label":"pypdf2","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 1.27.5","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.27.5","eol":null,"hubHref":"/vendor/pypdf2_project/pypdf2"},{"vendor":"PyPI","product":"pypdf2","name":"pypdf2","label":"pypdf2","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/pypdf2","purlType":"pypi","versions":[{"text":"< 1.27.5","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.27.5","eol":null,"hubHref":null},{"vendor":"opensuse","product":"python-PyPDF2&distro=openSUSE Leap 15.6","name":"python-PyPDF2","label":"python-PyPDF2&distro=openSUSE Leap 15.6","ecosystem":"openSUSE","cpePart":null,"purl":"pkg:rpm/opensuse/python-PyPDF2&distro=openSUSE Leap 15.6","purlType":"rpm","versions":[{"text":"< 1.26.0-bp156.4.3.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.26.0-bp156.4.3.1","eol":null,"hubHref":null},{"vendor":"suse","product":"python-PyPDF2&distro=SUSE Package Hub 15 SP6","name":"python-PyPDF2","label":"python-PyPDF2&distro=SUSE Package Hub 15 SP6","ecosystem":"SUSE Linux Enterprise","cpePart":null,"purl":"pkg:rpm/suse/python-PyPDF2&distro=SUSE Package Hub 15 SP6","purlType":"rpm","versions":[{"text":"< 1.26.0-bp156.4.3.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.26.0-bp156.4.3.1","eol":null,"hubHref":null}],"affectedCount":9,"eol":{"hasEol":true,"count":1},"references":[{"url":"https://github.com/py-pdf/PyPDF2/security/advisories/GHSA-xcjx-m2pj-8g79","label":"github.com/py-pdf/PyPDF2/security/advisories/GHSA-xcjx-m2pj-8g79","hostname":"github.com","tags":["WEB","Advisory","REPORT","Exploit","Third Party Advisory"]},{"url":"https://github.com/py-pdf/PyPDF2/issues/329","label":"github.com/py-pdf/PyPDF2/issues/329","hostname":"github.com","tags":["WEB","REPORT","Exploit","Third Party Advisory"]},{"url":"https://github.com/py-pdf/PyPDF2/pull/740","label":"github.com/py-pdf/PyPDF2/pull/740","hostname":"github.com","tags":["WEB","REPORT","Patch","Third Party Advisory"]},{"url":"https://github.com/py-pdf/PyPDF2/releases/tag/1.27.5","label":"github.com/py-pdf/PyPDF2/releases/tag/1.27.5","hostname":"github.com","tags":["WEB","REPORT","Release Notes","Third Party Advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/06/msg00001.html","label":"lists.debian.org/debian-lts-announce/2022/06/msg00001.html","hostname":"lists.debian.org","tags":["Mailing List","WEB","Third Party Advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/06/msg00013.html","label":"lists.debian.org/debian-lts-announce/2023/06/msg00013.html","hostname":"lists.debian.org","tags":["Mailing List","WEB"]},{"url":"https://advisories.mageia.org/MGASA-2022-0224.html","label":"advisories.mageia.org/MGASA-2022-0224.html","hostname":"advisories.mageia.org","tags":["Advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=30511","label":"bugs.mageia.org/show_bug.cgi?id=30511","hostname":"bugs.mageia.org","tags":["REPORT"]},{"url":"https://www.debian.org/lts/security/2022/dla-3039","label":"www.debian.org/lts/security/2022/dla-3039","hostname":"www.debian.org","tags":["WEB"]},{"url":"https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/JXAHSUMAQ6VKWEA3MS762SNZWXCCD54L/","label":"lists.opensuse.org/archives/…","hostname":"lists.opensuse.org","tags":["Advisory"]},{"url":"https://bugzilla.suse.com/1198588","label":"bugzilla.suse.com/1198588","hostname":"bugzilla.suse.com","tags":["REPORT"]},{"url":"https://www.suse.com/security/cve/CVE-2022-24859","label":"www.suse.com/security/cve/CVE-2022-24859","hostname":"www.suse.com","tags":["WEB"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24859","label":"nvd.nist.gov/vuln/detail/CVE-2022-24859","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/py-pdf/PyPDF2","label":"github.com/py-pdf/PyPDF2","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pypdf2/PYSEC-2022-194.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/pypdf2/PYSEC-2022-194.yaml","hostname":"github.com","tags":["WEB"]},{"url":"https://ubuntu.com/security/CVE-2022-24859","label":"ubuntu.com/security/CVE-2022-24859","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-6176-1","label":"ubuntu.com/security/notices/USN-6176-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-24859","label":"www.cve.org/CVERecord?id=CVE-2022-24859","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-24859","label":"security-tracker.debian.org/tracker/CVE-2022-24859","hostname":"security-tracker.debian.org","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2022-04-18T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-04-22T18:15:17.460Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":35,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T13:35:42.621Z","stale":false,"partial":false}}