GHSA-cgf9-327m-v77c: Pip/pypdf vulnerability
Impact
An attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires parsing content streams with many small operations.
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
Who is exposed to this issue?
Applications that parse attacker-controlled or otherwise untrusted PDF files with pypdf are exposed, particularly when they process PDF content streams.
What must an attacker provide to trigger the problem?
The attacker must supply a crafted PDF containing content streams with many small operations. Parsing that PDF can cause large memory usage.
Which version contains the fix?
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.