Infinite Loop Vulnerability in MuPDF Package Leading to Denial of Service

mupdf Updated 02 Oct 2025

Summary

14/01/2018
N/A
Yes i
Medium
5.5

ALPINE-CVE-2018-5686: In MuPDF 1.12.0, there is an infinite loop vulnerability and application hang in the pdf_parse_array function (pdf/pdf-parse.c) because EOF is not considered. Affects mupdf versions < 1.13-r0. Fixed in 1.13-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

MuPDF is a lightweight PDF, XPS, and eBook viewer and toolkit designed for high-quality rendering of documents. It is widely used for its efficiency and speed in handling various document formats. However, the package has been identified to have a critical vulnerability that can lead to application hangs and denial of service when processing specially crafted PDF files.

Vulnerability Detail

In MuPDF version 1.12.0, an infinite loop vulnerability exists in the pdf_parse_array function located in pdf/pdf-parse.c. This vulnerability arises because the end of file (EOF) condition is not properly handled, allowing remote attackers to exploit this flaw by sending a crafted PDF file. The ramifications include potential denial of service, where the application may become unresponsive, impacting users and services relying on the PDF processing capabilities of MuPDF.

How To Fix

Minimum fixed version

1.13-r0

This is the first release that contains the fix.

sudo apk add --upgrade mupdf

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid opening untrusted or unknown PDF files until the package is updated. Implementing strict input validation on PDF files can also help mitigate the risk of exploitation.

Conclusion

The infinite loop vulnerability in MuPDF poses a significant risk of denial of service due to improper handling of EOF conditions in PDF files. It is crucial for users to update to the patched version 1.13-r0 to safeguard against potential exploits. Additionally, employing workarounds can help mitigate risks until updates are applied.

See every vulnerability recorded for mupdf →

Share this vulnerability

FAQ

The vulnerability affects MuPDF versions prior to 1.13-r0 across multiple Alpine versions including v3.7, v3.8, v3.9, v3.10, and v3.11.

The CVSS score for this vulnerability is 5.5, indicating a moderate level of severity.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. By utilizing the Vulert playground, you can check if your application is affected without needing to sign up.

The primary impact is denial of service, where the application may hang indefinitely when processing malicious PDF files, disrupting normal operations.

Yes, avoid opening untrusted PDF files and implement strict input validation to reduce the risk of exploitation until the patch is applied.

Related vulnerabilities

Recent vulnerabilities recorded for mupdf.

How To Fix

Minimum fixed version

1.13-r0

This is the first release that contains the fix.

sudo apk add --upgrade mupdf

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback