Py-pdf pypdf
pypdf: Possible large memory usage when parsing font data
pypdf is a free and open-source pure-python PDF library. Prior to 6.18.1, a crafted PDF can provide a TrueType or Type1 simple font with an unusually large /Widths array, causing pypdf/_font.py Font._collect_tt_t1_character_widths to process entries beyond the 256 character codes meaningful for a simple font and consume excessive memory during operations such as text extraction. This issue is fixed in version 6.18.1.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS8.7high · scored by CNA · CWE-400
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
py-pdf pypdf
- < 6.18.1
Fixed in 6.18.1
Mitigation
Upgrade pypdf to 6.18.1 or later.
References
- Vendor advisory github.com/py-pdf/pypdf/security/advisories/GH…
- Patch github.com/py-pdf/pypdf/pull/4072
- Patch github.com/py-pdf/pypdf/commit/0fb26eb8cdd01c4…
1 more
- Release notes github.com/py-pdf/pypdf/releases/tag/6.18.1
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.