Created attachment 26770 [details] See the attachment for the specific POC file, vulnerability cause, reproduction process and repair suggestions. There is a denial of service vulnerability in MuPDF 1.25.6 and earlier versions. When an attacker runs the "mutool clean poc /dev/null" command, the program will fall into an infinite recursion between the strip_outlines() and strip_outline() functions in pdf-clean-file.c until the stack is exhausted. See the attachment for the specific POC file, vulnerability cause, reproduction process and repair suggestions.
I can confirm that building MuPDF 1.25.6 with ASAN causes an issue. The problem persists until current git HEAD 0cc36afd2.
I have a patch fixing this issue awaiting review.
Fixed in commit 0ec7e4d2201bb6df217e01c17396d36297abf9ac Author: Sebastian Rasmussen <sebras@gmail.com> Date: Sat May 10 23:26:47 2025 +0200 Bug 708521: Avoid recursive cycle while stripping outlines.
Also see bug https://bugs.ghostscript.com/show_bug.cgi?id=708541
Thanks for such a fast fix! Since this bug has been resolved and fixed, Iād like it to be made public so others can benefit from the fix and details. Could you please remove the group restriction or make it public?
The bug report has now been made public.