Loop with Unreachable Exit Condition ('Infinite Loop') Affecting pypdf2 package, versions <2.12.1-4


Severity

Recommended
0.0
medium
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.08% (39th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIANUNSTABLE-PYPDF2-5747235
  • published29 Jun 2023
  • disclosed27 Jun 2023

Introduced: 27 Jun 2023

CVE-2023-36464  (opens in a new tab)
CWE-835  (opens in a new tab)

How to fix?

Upgrade Debian:unstable pypdf2 to version 2.12.1-4 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream pypdf2 package and not the pypdf2 package as distributed by Debian. See How to fix? for Debian:unstable relevant fixed versions and status.

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&#34;\r&#34;, b&#34;\n&#34;) in pypdf/generic/_data_structures.py to while peek not in (b&#34;\r&#34;, b&#34;\n&#34;, b&#34;&#34;).

CVSS Base Scores

version 3.1