Description
PyMuPDF through 1.28.2, fixed in commit b2c8f3a, contains a path traversal vulnerability in the font branch of extract_objects() in src/__main__.py, where the output filename is constructed by joining a document-controlled BaseFont name directly onto the user-supplied output directory without stripping path separators or dot-dot sequences. Attackers can supply a crafted PDF, EPUB, XPS, or FB2 file with a BaseFont name containing encoded path separators that decode to ../ sequences or absolute paths, causing arbitrary file writes outside the intended output directory without requiring authentication or elevated privileges.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| PyMuPDF | PyMuPDF | ≤ 1.8.2 | — |
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 | pymupdf | No fix yet | — |
| Debian 13 | pymupdf | No fix yet | — |
| Debian 12 | pymupdf | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | pymupdf | No fix yet | — |
| Ubuntu 26.04 LTS | pymupdf | No fix yet | — |
| Ubuntu 24.04 LTS | pymupdf | No fix yet | — |
| Ubuntu 22.04 LTS | pymupdf | No fix yet | — |
| Ubuntu 20.04 LTS | pymupdf | No fix yet | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-PyMuPDF | 1.28.2-1.1 | openSUSE-SU-2026:11824-1 |
| openSUSE Leap 16.0 | python-PyMuPDF | 1.21.1-lp160.6.1 | openSUSE-SU-2026:21912-1 |
Advisories 2
- openSUSE-SU-2026:21912-1 Security update for python-PyMuPDF SUSE / openSUSE Security Updates · Sep 25, 2026
- openSUSE-SU-2026:11824-1 python313-PyMuPDF-1.28.2-1.1 on GA media SUSE / openSUSE Security Updates · Sep 20, 2026
References
- Patch Commit patch
- https://www.vulncheck.com/advisories/pymupdf-path-traversal-via-extract-objects-font-branch third-party-advisory