Junglewise Threat Intelligence

CVE-2026-82035: PyMuPDF path traversal in extract_objects font handling

CVE-2026-82035 · Severity: high · CVSS 7.1 · Published 2026-09-14

Executive brief

PyMuPDF is a popular Python library for reading and manipulating PDF documents and other file formats. A path traversal vulnerability in the extract_objects() function allows an attacker to write arbitrary files outside the intended output directory by crafting a malicious PDF or similar document with specially encoded font names. An attacker can exploit this without authentication to overwrite critical system files or plant malicious content on a target system.

Technical details

This is a path traversal vulnerability (CWE-22) in the font extraction branch of PyMuPDF's extract_objects() function in src/__main__.py. The vulnerable code constructs output filenames by directly concatenating a document-controlled BaseFont name with the user-supplied output directory path, without sanitizing path separators or dot-dot sequences. An attacker can craft a PDF, EPUB, XPS, or FB2 file with a BaseFont name containing encoded path separators (e.g., ../ sequences) or absolute paths, which are decoded during processing. When extract_objects() processes the document, it writes the extracted font to a location controlled by the attacker, bypassing directory restrictions. The attack requires only a crafted input file and user interaction to run the extraction; no authentication or elevated privileges are needed. The vulnerability is fixed in commit b2c8f3a by escaping forward slash and backslash characters in BaseFont names.

Affected products

  • PyMuPDF PyMuPDF through 1.28.2

Timeline

  • 2026-09-14: disclosed
  • 2026-09-14: patched: commit b2c8f3a

References