DjVuLibre Out-of-Bounds Write Vulnerability in MMRDecoder Allowing Code Execution

Vulnerability

A vulnerability has been identified in DjVuLibre versions prior to 3.5.29, specifically within the MMRDecoder::scanruns method. This out-of-bounds write vulnerability arises because the method fails to ensure that the 'xr' pointer remains within the limits of the allocated buffer. Consequently, this oversight can lead to memory corruption, creating a condition that could be exploited for arbitrary code execution. The issue was discovered through fuzzing and is particularly concerning because DjVuLibre is used by default document viewers on many Linux distributions, such as Evince and Papers. Exploitation of this vulnerability can bypass standard security protections and is demonstrated in a proof-of-concept video.

Impact

Exploitation of this vulnerability can lead to arbitrary code execution on the affected system.

Reproduction

The vulnerability can be reproduced by opening a crafted DjVu file with a .pdf extension using the Evince or Papers document viewer on an Ubuntu 25.04 (x86_64) system. The file will be processed by DjVuLibre, which will decode it and trigger the out-of-bounds write vulnerability, resulting in code execution.

Remediation

Users can upgrade to DjVuLibre version 3.5.29 or later to address this vulnerability.

Added: Jul 3, 2025, 9:18 PM
Updated: Jul 3, 2025, 10:20 PM

Vulnerability Rating

Custom Algorithm
spread
6.6
impact
7.5
exploitability
5.8
remediation
7.7
relevance
0.2
threat
6.4
urgency
2.9
incentive
0.8

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.