CVE-2017-5628: Artifex Software MuJS integer overflow in MakeDay function

CVE-2017-5628 · Severity: high · CVSS 7.8 · Published 2017-01-30

MuJS is a lightweight JavaScript interpreter used by various applications to execute scripts. A vulnerability was found where processing a maliciously crafted JavaScript file can cause the software to crash or potentially allow unauthorized code execution. This could lead to a loss of data integrity or a complete system compromise if a user is tricked into opening a malicious script.

Technologies: Artifex Mujs. Vendors: Artifex.

Quick answers

Is CVE-2017-5628 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2017-5628 being exploited in the wild.
How severe is CVE-2017-5628?
High severity, with a CVSS score of 7.8, published 30 January 2017.
Which products and versions are affected?
Artifex Software, Inc. MuJS before 8f62ea10a0af68e56d5c00720523ebcba13c2e6a.
Is there a fix for CVE-2017-5628?
A patch was published on 2017-01-24: Fixed in commit 8f62ea10a0af68e56d5c00720523ebcba13c2e6a Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2017-5628 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2017-5628?
Check whether you run Artifex Mujs. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

An integer overflow vulnerability exists in Artifex Software MuJS before commit 8f62ea10a0af68e56d5c00720523ebcba13c2e6a. The root cause is a lack of validation for the month parameter in the MakeDay function within jsdate.c, which leads to an out-of-bounds read or integer wraparound when handling Date objects. An attacker can exploit this by providing a specially crafted JavaScript file for the engine to parse. Successful exploitation can result in a denial of service (application crash) or potentially arbitrary code execution under the context of the user running the MuJS interpreter. The issue was fixed by adding NaN checks before array access in the affected function.

Affected products

  • Artifex Software, Inc. MuJS before 8f62ea10a0af68e56d5c00720523ebcba13c2e6a

Timeline

  • 2017-01-23: disclosed: Issue reported to Ghostscript Bugzilla
  • 2017-01-24: patched: Fixed in commit 8f62ea10a0af68e56d5c00720523ebcba13c2e6a
  • 2017-01-30: advisory: NVD publication date

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.