Skip to content
Fencer Intel
medium 6.2

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

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 Fencer

Vendor 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-6
    fixed: 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 more
    not 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

Sources

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.