{"id":"CVE-2023-36464","state":"PUBLISHED","title":"Infinite Loop when a comment isn't followed by a character in pypdf","description":"pypdf is an open source, pure-python PDF library. In affected versions an attacker may craft a PDF which leads to an infinite loop if `__parse_content_stream` is executed. That is, for example, the case if the user extracted text from such a PDF. This issue was introduced in pull request #969 and resolved in pull request #1828. Users are advised to upgrade. Users unable to upgrade may modify the line `while peek not in (b\"\\r\", b\"\\n\")` in `pypdf/generic/_data_structures.py` to `while peek not in (b\"\\r\", b\"\\n\", b\"\")`.","publishedAt":"2023-06-27T21:24:30.685Z","updatedAt":"2024-12-03T16:56:06.186Z","severity":{"score":6.2,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"GitHub_M"},"assigner":"GitHub_M","products":["py-pdf pypdf"],"affected":[{"vendor":"py-pdf","product":"pypdf","versions":[{"version":" pypdf: < 3.90","status":"affected"},{"version":"PyPDF2: >= 2.2.0","status":"affected"}]}],"references":["https://github.com/py-pdf/pypdf/security/advisories/GHSA-4vvm-4w3v-6mr8","https://github.com/py-pdf/pypdf/pull/1828","https://github.com/py-pdf/pypdf/pull/969"],"weaknesses":["CWE-835"],"ingestedAt":"2026-10-29T20:06:08.715Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/36xxx/CVE-2023-36464.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2023-36464","state":"PUBLISHED","datePublished":"2023-06-27T21:24:30.685Z","dateUpdated":"2024-12-03T16:56:06.186Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2023-06-21T18:50:41.700Z"},"containers":{"cna":{"title":"Infinite Loop when a comment isn't followed by a character in pypdf","descriptions":[{"lang":"en","value":"pypdf is an open source, pure-python PDF library. In affected versions an attacker may craft a PDF which leads to an infinite loop if `__parse_content_stream` is executed. That is, for example, the case if the user extracted text from such a PDF. This issue was introduced in pull request #969 and resolved in pull request #1828. Users are advised to upgrade. Users unable to upgrade may modify the line `while peek not in (b\"\\r\", b\"\\n\")` in `pypdf/generic/_data_structures.py` to `while peek not in (b\"\\r\", b\"\\n\", b\"\")`."}],"affected":[{"vendor":"py-pdf","product":"pypdf","versions":[{"version":" pypdf: < 3.90","status":"affected"},{"version":"PyPDF2: >= 2.2.0","status":"affected"}]}],"references":[{"url":"https://github.com/py-pdf/pypdf/security/advisories/GHSA-4vvm-4w3v-6mr8","name":"https://github.com/py-pdf/pypdf/security/advisories/GHSA-4vvm-4w3v-6mr8","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/py-pdf/pypdf/pull/1828","name":"https://github.com/py-pdf/pypdf/pull/1828","tags":["x_refsource_MISC"]},{"url":"https://github.com/py-pdf/pypdf/pull/969","name":"https://github.com/py-pdf/pypdf/pull/969","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"HIGH","baseScore":6.2,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-835","lang":"en","description":"CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2023-06-27T21:24:30.685Z"},"source":{"advisory":"GHSA-4vvm-4w3v-6mr8","discovery":"UNKNOWN"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://github.com/py-pdf/pypdf/security/advisories/GHSA-4vvm-4w3v-6mr8","name":"https://github.com/py-pdf/pypdf/security/advisories/GHSA-4vvm-4w3v-6mr8","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"https://github.com/py-pdf/pypdf/pull/1828","name":"https://github.com/py-pdf/pypdf/pull/1828","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://github.com/py-pdf/pypdf/pull/969","name":"https://github.com/py-pdf/pypdf/pull/969","tags":["x_refsource_MISC","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T16:45:57.117Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-12-03T16:55:56.361143Z","id":"CVE-2023-36464","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-12-03T16:56:06.186Z"}}]}}}