cve.bz

CVE-2022-24859 Infinite Loop

5.5 mediumExploit referenceEPSS 1.3%Fix available

Medium (5.5). EPSS 1.3% estimated probability of exploitation activity in the next 30 days. Fixed in pypdf2 1.27.5.

On this page
PyPDF2 is an open source python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files. In versions prior to 1.27.5 an attacker who uses this vulnerability can craft a PDF which leads to an infinite loop if the PyPDF2 if the code attempts to get the content stream. The reason is that the last while-loop in `ContentStream._readInlineImage` only terminates when it finds the `EI` token, but never actually checks if the stream has already ended. This issue has been resolved in version `1.27.5`. Users unable to upgrade should validate and PDFs prior to iterating over their content stream.

Severity

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
EPSS
1.3% (unchanged from 1.3% a week ago; 1.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 72nd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2025-04-22. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-835 Loop with Unreachable Exit Condition (Infinite Loop)
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-24859 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-24859?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-24859?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-24859 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
pypdf2_project:pypdf2before 1.27.5
debian:debian_linux9.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-xcjx-m2pj-8g79PyPIpypdf2<1.27.51.27.5
PYSEC-2022-194PyPIpypdf2<1.27.51.27.5

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9pypdf21.26.0-2+deb9u1DLA-3039-1
Debian10pypdf21.26.0-2+deb10u1DLA-3451-1
Debian12pypdf21.27.9-1DEBIAN-CVE-2022-24859
Ubuntu20.04:LTSpypdf21.26.0-3ubuntu1.20.04.1UBUNTU-CVE-2022-24859 USN-6176-1
Ubuntu22.04:LTSpypdf21.26.0-4ubuntu0.22.04.1UBUNTU-CVE-2022-24859 USN-6176-1
UbuntuPro:16.04:LTSpypdf21.25.1-1ubuntu0.1~esm1UBUNTU-CVE-2022-24859 USN-6176-1
UbuntuPro:18.04:LTSpypdf21.26.0-2ubuntu0.1~esm1UBUNTU-CVE-2022-24859 USN-6176-1
SUSEPackage Hub 15 SP6python-PyPDF21.26.0-bp156.4.3.1openSUSE-SU-2024:0366-1
openSUSELeap 15.6python-PyPDF21.26.0-bp156.4.3.1openSUSE-SU-2024:0366-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat rates this Low.

ProductPackageStateAdvisory
Red Hat Quay 3quay/quay-rhel8Affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-24859.

References

Check your stackJSON