CVE-2023-36464

Infinite Loop when a comment isn't followed by a character in pypdf

Published Jun 27, 2023 CVSS 3.1 · 6.2 Medium EPSS < 1% KEV · Not listed
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"")`.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2023-1690 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"")`.
Github GHSA Github GHSA GHSA-4vvm-4w3v-6mr8 pypdf and PyPDF2 possible Infinite Loop when a comment isn't followed by a character
History
Type Values Removed Values Added
First Time appeared Py-pdf
Py-pdf pypdf
CPEs cpe:2.3:a:pypdf_project:pypdf:*:*:*:*:*:*:*:* cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:*
Vendors & Products Pypdf Project
Pypdf Project pypdf
Py-pdf
Py-pdf pypdf
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Dec 3, 2024, 4:56 PM
Reserved
Jun 21, 2023, 6:50 PM
Status
Modified
Published
Jun 27, 2023, 10:15 PM
Modified
Nov 2, 2026, 4:06 PM
Severity
Moderate
Public date
Jun 28, 2023, 12:00 AM