Free and open · new CVEs checked every 20 minutesStatusRSSOpen dataContact

CVE-2023-36464: pypdf is an open source, pure-python PDF library

34
Routine
MEDIUM 6.2UPGRADEDOWNGRADE

CVE-2023-36464 is a medium-severity flaw (CVSS 6.2) affecting pypdf, pypdf2. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.

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/g

Why this priority

  • Public exploit reference

A fixed release or distro patch exists.

Risk facts

CVSS score6.2 (Medium)
Attack vectorLocal
Attack complexityLow
Privileges neededNone
User interactionNone
EPSS exploit chance0.4% (top 71%)
CISA exploited listNo
WeaknessCWE-835
Published2023-06-27
Last modified2026-06-17
Publisher (CNA): GitHub, Inc. · Vendor: pypdf project · pypdf2 project

Share: LinkedIn · X · Reddit

Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score

Am I affected?

Timeline

pypdf project pypdf UPGRADE
Affected: < 3.9.0
Fixed in: 3.9.0
Safe to downgrade to: no unaffected older release
1. Check installed version
apt-cache policy pypdf || rpm -q pypdf || pypdf --version
2. UPGRADE to 3.9.0 (Debian / Ubuntu)
sudo apt update && sudo apt install --only-upgrade pypdf
2. UPGRADE (RHEL / Amazon Linux / Fedora)
sudo dnf upgrade pypdf
Note
Distros often backport fixes without changing the version number. Confirm with the distro advisory or changelog.
pypdf2 project pypdf2 DOWNGRADE
Affected: >= 2.2.0
Fixed in: no fixed release known
Safe to downgrade to: a release before 2.2.0
1. Check installed version
apt-cache policy pypdf2 || rpm -q pypdf2 || pypdf2 --version
2. No fixed release: DOWNGRADE to a release before 2.2.0 (Debian / Ubuntu)
apt-cache madison pypdf2 sudo apt install pypdf2=<VERSION_BEFORE_2.2.0> sudo apt-mark hold pypdf2
2. No fixed release: DOWNGRADE (RHEL / Amazon Linux / Fedora)
dnf --showduplicates list pypdf2 sudo dnf downgrade pypdf2-<VERSION_BEFORE_2.2.0> sudo dnf versionlock add pypdf2
Downgrade risk
Downgrading can break dependent software and may reopen older bugs. Read the distro advisory first and test on a non-production host.
After downgrade
Restart the service, and keep the package held until a fixed release ships.
Verify at the official source NVD · CVE Program · Report a problem with this page
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.

Quick answers

How do I fix CVE-2023-36464?

pypdf: upgrade to 3.9.0; pypdf2: downgrade or apply the listed mitigation. Exact commands for each OS are on this page.

Is CVE-2023-36464 being exploited?

CVE-2023-36464 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.

What does CVE-2023-36464 affect?

CVE-2023-36464 affects pypdf, pypdf2. Severity is medium (CVSS 6.2). 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

How urgent is CVE-2023-36464?

Priority 34/100. Public exploit reference

Software pages

Python vulnerabilities

Related CVEs

References

← Back to latest CVEs

Get the weekly exploited-CVE digest by emailThe CVEs being attacked this week and how to fix them. No spam, unsubscribe any time.