Description
pypdf is a free and open-source pure-python PDF library. Prior to 6.18.1, a crafted PDF can place unusually large source-code or destination-string tokens in a font /ToUnicode mapping, causing pypdf/_cmap.py parse_bfchar to decode and retain oversized values during operations such as text extraction and consume excessive memory. This is a second follow-up to earlier /ToUnicode resource-consumption fixes and is limited to the remaining token-length path. This issue is fixed in version 6.18.1.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| py-pdf | pypdf | < 6.18.1 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | pypdf | 6.19.0-1 | — |
| Debian 13 | pypdf | No fix yet | — |
| Debian 12 | pypdf +1 | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | pypdf | No fix yet | — |
| Ubuntu 26.04 LTS | pypdf | No fix yet | — |
| Ubuntu 24.04 LTS | pypdf +1 | No fix yet | — |
| Ubuntu 22.04 LTS | pypdf2 | No fix yet | — |
| Ubuntu 20.04 LTS | pypdf2 | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 18.04 LTS | pypdf2 | No fix yet | — |
| Ubuntu Pro 16.04 LTS | pypdf2 | No fix yet | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | open-webui | 0.11.4-r3 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | pypdf | < 6.18.1 | 6.18.1 | GHSA-fp3h-c4fm-7vvf |