CVE-2023-36464
MEDIUM 5.5CVSS 3.1pypdf and PyPDF2 possible Infinite Loop when a comment isn't followed by a character
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"").
- Published
- 27 Jun 2023
- Last modified
- 2 Nov 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-835
- Also known as
- GHSA-4vvm-4w3v-6mr8PYSEC-2026-1835PYSEC-2026-3008
- Sources
- NVDJSONOSV GHSA-4vvm-4w3v-6mr8JSONOSV PYSEC-2026-1835JSONOSV PYSEC-2026-3008JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | PyPA | CVSS 3.1 | MEDIUM 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | py-pdf | pypdfcpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:* |
< 3.9.0 | 3.9.0 |
| NVD | pypdf2_project | pypdf2cpe:2.3:a:pypdf2_project:pypdf2:*:*:*:*:*:*:*:* |
>= 2.2.0 | |
| OSV | PyPI | pypdf | >= 3.1.0, < 3.9.0 | 3.9.0 |
| OSV | PyPI | pypdf2 | >= 2.2.0, <= 3.0.1 | |
| OSV | PyPI | pypdf2 | >= 2.2.0, < 3.9.0 | 3.9.0 |
References
- https://github.com/py-pdf/pypdf/pull/1828 · Patch, WEB
- https://github.com/py-pdf/pypdf/pull/969 · Issue Tracking, Patch, WEB
- https://github.com/py-pdf/pypdf/security/advisories/GHSA-4vvm-4w3v-6mr8 · Exploit, Patch, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2023-36464 · ADVISORY
- https://github.com/py-pdf/pypdf/commit/b0e5c689df689ab173df84dacd77b6fc3c161932 · WEB, FIX
- https://github.com/py-pdf/pypdf · PACKAGE
- https://github.com/py-pdf/pypdf/releases/tag/3.9.0 · WEB
- https://pypi.org/project/pypdf2 · PACKAGE
- https://github.com/advisories/GHSA-4vvm-4w3v-6mr8 · ADVISORY
- https://pypi.org/project/pypdf · PACKAGE
History
- 25 Nov 2026 20:36 UTC · NVD: first stored (published 27 Jun 2023)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 13 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 30 Jun 2023)