Skip to content

CVE-2023-36464 Infinite Loop when a comment isn't followed by a character in pypdf

MediumCVSS 5.5 EPSS 0.35%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: partial
Technology
UbuntuDebian

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"").

Upgrade path

12 packages: 7 fixed, 5 with no fix yet.

PackageAffectedFixed inStatus
pypdf2 project pypdf2 >= 2.2.0 No fix listed No fix yet
ubuntu/pypdf(Ubuntu 24.04) = 3.4.1-1; = 3.17.4-1; = 4.0.0-1; = 4.0.1-1 +2 more No fix listed No fix yet
ubuntu/pypdf(Ubuntu 25.10) = 4.3.1-1; = 5.4.0-1; All versions No fix listed No fix yet
ubuntu/pypdf(Ubuntu 26.04) = 5.4.0-1; = 6.9.2-1; All versions No fix listed No fix yet
ubuntu/pypdf(Ubuntu 26.10) = 6.9.2-1; = 6.9.2-2; All versions No fix listed No fix yet
debian/pypdf(Debian 12) < 3.4.1-1+deb12u1; = 3.4.1-1 3.4.1-1+deb12u1 Fixed
debian/pypdf(Debian 13) < 3.17.4-1 3.17.4-1 Fixed
debian/pypdf(Debian 14) < 3.17.4-1 3.17.4-1 Fixed
debian/pypdf2(Debian 12) < 2.12.1-3+deb12u1; = 2.12.1-3 2.12.1-3+deb12u1 Fixed
py-pdf pypdf < 3.9.0; = PyPDF2: >= 2.2.0; = pypdf: < 3.90 3.9.0 Fixed
pypi pypdf(PyPI) = 3.1.0; = 3.2.0; = 3.2.1; = 3.3.0 +11 more 3.9.0 Fixed
pypi pypdf2(PyPI) = 2.2.0; = 2.2.1; = 2.3.0; = 2.3.1 +28 more 3.9.0 Fixed

Affected products

ProductAffected versionsFixed in
pypi pypdf(PyPI) >= 3.1.0, < 3.9.0 3.9.0
pypi pypdf(PyPI) = 3.1.0 No fix listed
pypi pypdf(PyPI) = 3.2.0 No fix listed
pypi pypdf(PyPI) = 3.2.1 No fix listed
pypi pypdf(PyPI) = 3.3.0 No fix listed
pypi pypdf(PyPI) = 3.4.0 No fix listed
pypi pypdf(PyPI) = 3.4.1 No fix listed
pypi pypdf(PyPI) = 3.5.0 No fix listed
pypi pypdf(PyPI) = 3.5.1 No fix listed
pypi pypdf(PyPI) = 3.5.2 No fix listed
pypi pypdf(PyPI) = 3.6.0 No fix listed
pypi pypdf(PyPI) = 3.7.0 No fix listed
pypi pypdf(PyPI) = 3.7.1 No fix listed
pypi pypdf(PyPI) = 3.8.0 No fix listed
pypi pypdf(PyPI) = 3.8.1 No fix listed
pypi pypdf2(PyPI) >= 2.2.0, <= 3.0.1 No fix listed
pypi pypdf2(PyPI) = 2.10.0 No fix listed
pypi pypdf2(PyPI) = 2.10.1 No fix listed
pypi pypdf2(PyPI) = 2.10.2 No fix listed
pypi pypdf2(PyPI) = 2.10.3 No fix listed
pypi pypdf2(PyPI) = 2.10.4 No fix listed
pypi pypdf2(PyPI) = 2.10.5 No fix listed
pypi pypdf2(PyPI) = 2.10.6 No fix listed
pypi pypdf2(PyPI) = 2.10.7 No fix listed
pypi pypdf2(PyPI) = 2.10.8 No fix listed
Show 47 more
ProductAffected versionsFixed in
pypi pypdf2(PyPI) = 2.10.9 No fix listed
pypi pypdf2(PyPI) = 2.11.0 No fix listed
pypi pypdf2(PyPI) = 2.11.1 No fix listed
pypi pypdf2(PyPI) = 2.11.2 No fix listed
pypi pypdf2(PyPI) = 2.12.0 No fix listed
pypi pypdf2(PyPI) = 2.12.1 No fix listed
pypi pypdf2(PyPI) = 2.2.0 No fix listed
pypi pypdf2(PyPI) = 2.2.1 No fix listed
pypi pypdf2(PyPI) = 2.3.0 No fix listed
pypi pypdf2(PyPI) = 2.3.1 No fix listed
pypi pypdf2(PyPI) = 2.4.0 No fix listed
pypi pypdf2(PyPI) = 2.4.1 No fix listed
pypi pypdf2(PyPI) = 2.4.2 No fix listed
pypi pypdf2(PyPI) = 2.5.0 No fix listed
pypi pypdf2(PyPI) = 2.6.0 No fix listed
pypi pypdf2(PyPI) = 2.7.0 No fix listed
pypi pypdf2(PyPI) = 2.8.0 No fix listed
pypi pypdf2(PyPI) = 2.8.1 No fix listed
pypi pypdf2(PyPI) = 2.9.0 No fix listed
pypi pypdf2(PyPI) = 3.0.0 No fix listed
pypi pypdf2(PyPI) = 3.0.1 No fix listed
pypi pypdf2(PyPI) >= 2.2.0, < 3.9.0 3.9.0
debian/pypdf(Debian:12) < 3.4.1-1+deb12u1 3.4.1-1+deb12u1
debian/pypdf(Debian:12) = 3.4.1-1 No fix listed
debian/pypdf(Debian:13) < 3.17.4-1 3.17.4-1
debian/pypdf(Debian:14) < 3.17.4-1 3.17.4-1
debian/pypdf2(Debian:12) < 2.12.1-3+deb12u1 2.12.1-3+deb12u1
debian/pypdf2(Debian:12) = 2.12.1-3 No fix listed
py-pdf pypdf = pypdf: < 3.90 No fix listed
py-pdf pypdf = PyPDF2: >= 2.2.0 No fix listed
ubuntu/pypdf(Ubuntu:24.04) All versions No fix listed
ubuntu/pypdf(Ubuntu:26.04) All versions No fix listed
ubuntu/pypdf(Ubuntu:26.10) All versions No fix listed
py-pdf pypdf < 3.9.0 3.9.0
pypdf2 project pypdf2 >= 2.2.0 No fix listed
ubuntu/pypdf(Ubuntu:24.04) = 3.4.1-1 No fix listed
ubuntu/pypdf(Ubuntu:24.04) = 3.17.4-1 No fix listed
ubuntu/pypdf(Ubuntu:24.04) = 4.0.0-1 No fix listed
ubuntu/pypdf(Ubuntu:24.04) = 4.0.1-1 No fix listed
ubuntu/pypdf(Ubuntu:24.04) = 4.0.2-1 No fix listed
ubuntu/pypdf(Ubuntu:25.10) All versions No fix listed
ubuntu/pypdf(Ubuntu:25.10) = 4.3.1-1 No fix listed
ubuntu/pypdf(Ubuntu:25.10) = 5.4.0-1 No fix listed
ubuntu/pypdf(Ubuntu:26.10) = 6.9.2-1 No fix listed
ubuntu/pypdf(Ubuntu:26.10) = 6.9.2-2 No fix listed
ubuntu/pypdf(Ubuntu:26.04) = 5.4.0-1 No fix listed
ubuntu/pypdf(Ubuntu:26.04) = 6.9.2-1 No fix listed

References