Junglewise Threat Intelligence

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

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

Technologies: Artifex Software, Inc. Mujs. Vendors: Artifex.

Executive brief

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.

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

Related threats