GHSA-f54x-cmq8-qg57: Pip/pypdf vulnerability
Impact
An attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires parsing arrays and/or dictionaries with lots of elements.
Patches
This has been fixed in pypdf==6.21.0.
Workarounds
If you cannot upgrade yet, consider applying the changes from PR #4218.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/pypdfto a version that resolves this vulnerability.Fixed in 6.21.0 - Upgrade
Upgrade
pypdfto a version that resolves this vulnerability.Fixed in 6.21.0
Event History
Frequently Asked Questions
What input must an attacker control to trigger the issue?
The attacker must be able to supply a crafted PDF that your application parses with pypdf. The PDF contains arrays and/or dictionaries with very large numbers of elements.
What is the practical impact on an affected application?
Parsing the crafted PDF can cause large memory usage. Applications that process untrusted PDFs are the relevant exposure scenario.
Which version fixes the issue?
The issue is fixed in pypdf 6.21.0.
What can be done if upgrading is not immediately possible?
Consider applying the changes from PR #4218 as a workaround.