CVE-2023-36464 json
Infinite Loop when a comment isn't followed by a character in pypdf
published 3y ago modified 13d ago also EUVD-2023-1690 , GHSA-4vvm-4w3v-6mr8 , PYSEC-2026-1835 , PYSEC-2026-3008
- cvss
- 6.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 29%
- public exploits
- 0
- none known
Summary
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"")`.
Patch / fix
- pypi pypdf 3.9.0
- pypi pypdf2 3.9.0
- py-pdf pypdf 3.9.0
- pypdf Debian 12 3.4.1-1+deb12u1
- pypdf Debian 14, Debian 13 3.17.4-1
- pypdf2 Debian 12 2.12.1-3+deb12u1
debian advisories DEBIAN-CVE-2023-36464
- github.com/py-pdf/pypdf@b0e5c68 commit
- github.com/py-pdf/pypdf/security/advisories/GHSA-4vvm-4w3v-6mr8 patch
- github.com/py-pdf/pypdf#1828 pull request
- github.com/py-pdf/pypdf#969 pull request
- github.com/py-pdf/pypdf/releases/tag/3.9.0 release
Is CVE-2023-36464 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2023-36464 updated cvss 6.2
pypdf: Possible Infinite Loop when a comment isn't followed by a character
-
Red Hat Quay v3 quay/quay-rhel8 v3.9.1-6fixed: vendor fix RHBA-2023:4974
-
Red Hat Quay v3 quay/clair-rhel8 v3.9.1-1, quay/quay-builder-rhel8 v3.9.1-1, quay/quay-operator-rhel8 v3.9.1-2, quay/quay-operator-bundle v3.9.1-7, quay/quay-bridge-operator-rhel8 v3.9.1-2, quay/quay-bridge-operator-bundle v3.9.1-2, +3 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- last yr.
Exploit prediction
0.35% chance of exploitation in the next 30 days, higher than 29% of all scored CVEs (FIRST EPSS, 2026-11-15).
Exploits and checks
- github.com https://github.com/py-pdf/pypdf/security/advisories/GHSA-4vvm-4w3v-6mr8 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 3.1 | 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| OSV | 3.1 | 6.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pypdf | >=3.1.0, <3.9.0 |
3.9.0 |
| pypi | pypdf2 | >=2.2.0, <=3.0.1 >=2.2.0, <3.9.0 |
3.9.0 |
Affected products
- py-pdf pypdf
Classification
- Weakness
-
- CWE-835 Loop with Unreachable Exit Condition
References
-
github.com
/py-pdf/pypdf/pull/1828
web, patch
-
github.com
/py-pdf/pypdf/pull/969
web, issue-tracking, patch
-
github.com
/py-pdf/pypdf/security/advisories/GHSA-4vvm-4w3v-6mr8
web, exploit, patch, advisory
-
github.com
/py-pdf/pypdf/commit/b0e5c689df689ab173df84dacd77b6fc3c161932
web, patch
-
nvd.nist.gov
/vuln/detail/CVE-2023-36464
advisory
-
github.com
/py-pdf/pypdf
package
-
github.com
/py-pdf/pypdf/releases/tag/3.9.0
web
-
pypi.org
/project/pypdf2
package
-
github.com
/advisories/GHSA-4vvm-4w3v-6mr8
advisory
-
pypi.org
/project/pypdf
package
Sources
- CVE List CVE-2023-36464
- GitHub Advisory GHSA-4vvm-4w3v-6mr8
- NVD CVE-2023-36464
- OSV PYSEC-2026-1835
- OSV PYSEC-2026-3008
- Maintainer advisory GHSA-4vvm-4w3v-6mr8
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
The maintainers of py-pdf/pypdf published their own advisory on GitHub. Reviewed sources take precedence over it.