SRC-2019-0057 : Artifex MuJS regcompx pattern Integer Overflow Remote Code Execution Vulnerability Vulnerability

CVE ID:

CVE-2019-12798

CVSS Score:

7.0, (AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H)

Affected Vendors:

Artifex

Affected Products:

MuJS

Vulnerability Details:

This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations of MuPDF. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.

The specific flaw exists within the handling of the regcompx function. The issue results from the lack of proper validation of user-supplied data, which can result in an integer overflow before writing to memory. An attacker can leverage this vulnerability to execute code in the context of the current process.

Vendor Response:

Artifex has issued an update to correct this vulnerability. More details can be found at:
http://git.ghostscript.com/?p=mujs.git;h=7f50591861525f76e3ec7a63392656ff8c030af9

Disclosure Timeline:

  • 2018-12-25 – Verified and reported as bugid 700429
  • 2019-01-02 – Patched in 7f50591861525f76e3ec7a63392656ff8c030af9
  • 2019-06-13 – Coordinated public release of advisory

Proof of Concept:

/pocs/src-2019-0057.js.txt

Credit:

This vulnerability was discovered by Steven Seeley (mr_me) of Source Incite