Executive brief
Artifex MuPDF is a widely used library for viewing and managing PDF documents. A vulnerability in its document cleaning utility allows a remote attacker to crash the application by providing a specially crafted PDF file. This results in a denial of service, potentially disrupting business operations that rely on automated PDF processing or document viewing.
Technical details
A denial of service vulnerability exists in Artifex MuPDF versions 1.25.5 and 1.25.6 due to uncontrolled recursion (CWE-674). The issue resides in the `strip_outline()` and `strip_outlines()` functions within `pdf-clean-file.c`. When the `mutool clean` utility processes a PDF containing cyclic `/Next` references in its outline structure, the program enters an infinite recursive loop until the stack is exhausted. An attacker can exploit this by providing a malicious PDF to a user or service that utilizes the `mutool` utility. A fix has been committed to the MuPDF repository to detect and prevent these cycles.
Affected products
- Artifex MuPDF 1.25.5, 1.25.6
Timeline
- 2025-05-10: disclosed: Bug reported to Ghostscript Bugzilla
- 2025-05-12: patched: Fix committed to MuPDF master branch
- 2025-08-04: advisory: CVE published to NVD