GHSA-g9cg-prrw-2r8q: Pip/pypdf vulnerability
Impact
An attacker who uses this vulnerability can craft a PDF which leads to large memory consumption. This requires parsing the /Widths entry of a TrueType or Type1 fonts with unusually large values, for example during text extraction.
Patches
This has been fixed in pypdf==6.18.1.
Workarounds
If you cannot upgrade yet, consider applying the changes from PR #4072.
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.18.1 - Upgrade
Upgrade
pypdfto a version that resolves this vulnerability.Fixed in 6.18.1
Event History
Frequently Asked Questions
What input and processing path are required for exploitation?
An attacker must provide a crafted PDF containing a TrueType or Type1 font whose /Widths entry has unusually large values. The issue is triggered when that entry is parsed, such as during text extraction.
Which pypdf release contains the fix?
The issue is fixed in pypdf 6.18.1.
What can be done if upgrading is not immediately possible?
Consider applying the changes from PR #4072 until an upgrade to the fixed release can be completed.