pypdf2
Affected
- introduced
0, fixed1.27.5(ecosystem)
Fixed versions
1.27.5
Fix
- Fixed version
1.27.5pip install --upgrade pypdf2==1.27.5
Advisory
Also known as: CVE-2022-24859, PYSEC-2022-194
Manipulated inline images can cause Infinite Loop in PyPDF2
Impact
An attacker who uses this vulnerability can craft a PDF which leads to an infinite loop if the PyPDF2 user wrote the following code:
from PyPDF2 import PdfFileReader, PdfFileWriter
from PyPDF2.pdf import ContentStream
reader = PdfFileReader("malicious.pdf", strict=False)
for page in reader.pages:
ContentStream(page.getContents(), reader)
Patches
`PyPDF2==1.27.5` and later are patched.
Credits to Sebastian Krause for finding (issue) and fixing (PR) it.
Medium Basis: The source's own band: MODERATE
0, fixed 1.27.5 (ecosystem)1.27.5
1.27.5pip install --upgrade pypdf2==1.27.5Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0