Read the docs
TI-2023-18305 Aliases CVE-2023-36464GHSA-4vvm-4w3v-6mr8

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

Priority MEDIUM 61CWE-835Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-835.

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

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00352 29th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed pypdf (PyPI): 3.9.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
py-pdfpypdf pypdf: < 3.90; PyPDF2: >= 2.2.0—No fix listedCNA
—pypdf (PyPI)3.1.0 to before 3.9.03.9.0Patch availableGHSA-4vvm-4w3v-6mr8
—PyPDF2 (PyPI)2.2.0 – 3.0.1—No fix listedGHSA-4vvm-4w3v-6mr8
  • pypdf Vendorpy-pdf Affected pypdf: < 3.90; PyPDF2: >= 2.2.0 Fixed in — No fix listed CNA
  • pypdf (PyPI) Vendor— Affected 3.1.0 to before 3.9.0 Fixed in 3.9.0 Patch available GHSA-4vvm-4w3v-6mr8
  • PyPDF2 (PyPI) Vendor— Affected 2.2.0 – 3.0.1 Fixed in — No fix listed GHSA-4vvm-4w3v-6mr8

CPE configurations NVD · 2

CPEVersionsRoleVendor
cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:*before 3.9.0Vulnerablepy-pdf
cpe:2.3:a:pypdf2_project:pypdf2:*:*:*:*:*:*:*:*2.2.0VulnerablePypdf2 Project
  • cpe:2.3:a:py-pdf:pypdf:*:*:*:*:*:*:*:* Versions before 3.9.0 Vulnerable ·py-pdf
  • cpe:2.3:a:pypdf2_project:pypdf2:*:*:*:*:*:*:*:* Versions 2.2.0 Vulnerable ·Pypdf2 Project

Remediation

  • Fix · GHSA-4vvm-4w3v-6mr8 pypdf (PyPI) Fixed in 3.9.0 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Quay v3Fixed—
Not affected: 1 product
  • Quay v3

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-36464
  2. 2026-10-03 Alias added: GHSA-4vvm-4w3v-6mr8
  3. 2026-10-30 Affected versions changed · Red Hat

References

  • TI-2023-18601 Infinite Loop when reading malformed objects in pypdf CVSS 3.1MEDIUM 6.5
  • TI-2026-42743 pypdf: Possible infinite loop for not terminated inline images CVSS 4.0HIGH 8.7
  • TI-2026-42742 pypdf: Possible infinite loop for not terminated inline images (ASCII85 and ASCIIHex filter) CVSS 4.0HIGH 8.7
  • TI-2026-65557 pypdf: Possible large memory usage when retrieving alphabetical page labels CVSS 4.0HIGH 8.7
  • TI-2026-65556 pypdf: Possible long runtimes with large amount of embedded files CVSS 4.0HIGH 8.7
  • TI-2026-65555 pypdf: Possible long runtimes when generating appearance streams CVSS 4.0HIGH 8.7
See all 65 →

Sources