When I try to read the metadata of Effective Java 3rd Edition by Joshua Bloch.pdf it takes extremely long. It might even be an infinite loop.
Environment
Which environment were you using when you encountered the problem?
$ python -m platform
Linux-5.4.0-125-generic-x86_64-with-debian-bullseye-sid
$ python -c "import PyPDF2;print(PyPDF2.__version__)"
2.10.5
Code + PDF
This is a minimal, complete example that shows the issue:
from PyPDF2 import PdfReader
reader = PdfReader("Effective Java 3rd Edition by Joshua Bloch.pdf")
metadata = reader.metadata
The PDF: Effective Java 3rd Edition by Joshua Bloch.pdf
Affected
- NOT: PyPDF2<=2.10.4 (throws an exception)
- NOT PyPDF2>=2.10.6 (reads data properly)
- IS AFFECTED: PyPDF2==2.10.5
- See GHSA-hm9v-vj3r-r55m
When I try to read the metadata of Effective Java 3rd Edition by Joshua Bloch.pdf it takes extremely long. It might even be an infinite loop.
Environment
Which environment were you using when you encountered the problem?
$ python -m platform Linux-5.4.0-125-generic-x86_64-with-debian-bullseye-sid $ python -c "import PyPDF2;print(PyPDF2.__version__)" 2.10.5Code + PDF
This is a minimal, complete example that shows the issue:
The PDF: Effective Java 3rd Edition by Joshua Bloch.pdf
Affected