SecurityContext

CVE-2023-36464: pypdf - Denial of Service

  • Cve: CVE-2023-36464
  • Name: pypdf - Denial of Service
  • 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"")`.
  • Impact: Attackers can cause denial of service by triggering infinite loops during PDF content parsing, leading to application hang or resource exhaustion.
  • Remediation: Upgrade to the latest version of pypdf or modify the line 'while peek not in (b"\r", b"\n")' to 'while peek not in (b"\r", b"\n", b"")' in '_data_structures.py'.
  • Vulnerability impact: denial_of_service
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 5.5
  • Cvss vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
  • Epss score: 0.00352
  • Epss percentile: 0.29254
  • Assignee: [email protected]
  • Published at: 2023-06-27T22:15:11Z
  • Age in days: 1246
  • Modified at: 2026-11-02T16:06:04Z
  • Patch available: yes
  • Public exploits total: 1
  • References total: 3
  • Products total: 2
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2023-36464
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: vulnerability type, requirements, hackerone

Cwe

IdName
CWE-835Loop with Unreachable Exit Condition

Public exploits

UrlSourceAdded date
https://github.com/py-pdf/pypdf/security/advisories/GHSA-4vvm-4w3v-6mr8nvd2023-06-27

References

Same in every row:

  • Source: nvd
UrlTags
https://github.com/py-pdf/pypdf/pull/1828Patch
https://github.com/py-pdf/pypdf/pull/969Issue Tracking, Patch
https://github.com/py-pdf/pypdf/security/advisories/GHSA-4vvm-4w3v-6mr8Exploit, Patch

Products

ProductAffectedPlatform boundSourcesUrl
py-pdf:pypdf< 3.9.0nonvd/v1/products/py-pdf/pypdf
pypdf2_project:pypdf2>= 2.2.0nonvd/v1/products/pypdf2_project/pypdf2

Projects

RepositoryLink kindsIndexedUrl
py-pdf/pypdfcommit, fix, package, pull, releases, security_advisoryyes/v1/repositories/py-pdf/pypdf

Index

  • Repositories: 243
  • Repositories high signal: 105
  • Packages: 2

Exploitation

  • Public exploit: yes
  • Public exploit count: 1
  • Public exploit first date: 2023-06-27
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, remote, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts