Arbitrary Code Execution Vulnerabilities in MuPDF Identified and Patched

2017-05-16T09:47:00
ID TALOSBLOG:2FD882712489E5FBAF9EE840BA194215
Type talosblog
Reporter noreply@blogger.com (Alexander Chiu)
Modified 2017-05-16T12:47:42

Description

Talos is disclosing the presence of two vulnerabilities in the Artifex MuPDF renderer. MuPDF is a lightweight PDF parsing and rendering library featuring high fidelity graphics, high speed, and compact code size which makes it a fairly popular PDF library for embedding in different projects, especially mobile and web applications. Both of these vulnerabilities, if exploited, could lead to arbitrary code execution of an attacker's choice on the target device. Both of these vulnerabilities have been responsibly disclosed and Artifex has released software updates to address these vulnerabilities.<br /><br /><h2 id="h.tux54arpgffc">Vulnerability Details</h2>Two memory corruption vulnerabilities exist within Artifex MuPDF render that could result in arbitrary code execution if exploited. These two vulnerabilities manifest as a result of improperly parsing and handling parts of a PDF file. <br /><a name='more'></a><br /><ul><li><a href="http://www.talosintelligence.com/reports/TALOS-2016-0242">TALOS-2016-0242</a> - MuPDF Fitz library font glyph scaling Code Execution Vulnerability<br />This is a heap out-of-bounds write vulnerability that manifests in the glyph scaling code when a font glyph must be scaled down.<br /><br />Vulnerability identified by Aleksandar Nikolic.<br /><br /></li><li><a href="http://www.talosintelligence.com/reports/TALOS-2016-0243">TALOS-2016-0243</a> - MuPDf JBIG2 Parser Code Execution Vulnerability<br />This is a heap-based buffer overflow vulnerability that manifests in the JBIG2 image parsing functionality for JBIG2 images that are embedded in a PDF.<br /><br />Vulnerability identified by Aleksandar Nikolic and Cory Duplantis.</li></ul>Both of these vulnerabilities could be exploited if an adversary were to specifically craft a PDF file and have a victim open that PDF file with MuPDF. Scenarios where an adversary could achieve remote code execution are email-based attack scenarios, where a user opens a malicious PDF attachment, or where a user downloads a malicious PDF from site hosting user content.<br /><br />For the full technical details of these vulnerabilities, please refer to the vulnerability advisories that are posted on our website:<br /><br /><a href="http://www.talosintelligence.com/vulnerability-reports/">http://www.talosintelligence.com/vulnerability-reports/</a><br /><br /><h2 id="h.610e9o9vgbc4">Coverage</h2>The following Snort Rules detect attempts to exploit these MuPDF vulnerabilities. Please note that additional rules may be released at a future date and current rules are subject to change pending additional vulnerability information. For all current rule information, please refer to your Firepower Management Center or Snort.org.<br /><br />Snort Rules: 41470-41471, 41224-41225<br /><br /><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/feedburner/Talos?a=2gFziI5oj6Q:5HPqYFRGlsk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/feedburner/Talos?d=yIl2AUoC8zA" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/feedburner/Talos/~4/2gFziI5oj6Q" height="1" width="1" alt=""/>