# CVE-2016-10141: Artifex MuJS integer overflow in regemit function

Source: https://junglewise.ai/threats/cve-2016-10141-artifex-mujs-integer-overflow-in-regemit-function  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2017-01-13. Updated: 2026-05-13  
License: CC BY 4.0 with a link back

CVE-2016-10141 · Severity: critical · CVSS 9.8 · Published 2017-01-13

MuJS is a lightweight JavaScript interpreter used in various applications to execute scripts. A vulnerability in its regular expression engine allows an attacker to crash the application or potentially execute unauthorized code by providing a specially crafted script. This could lead to a complete system compromise or a disruption of services that rely on the MuJS library.

Technologies: [Artifex Mujs](https://junglewise.ai/threats/technologies/mujs). Vendors: [Artifex](https://junglewise.ai/threats/vendors/artifex).

## Quick answers

**Is CVE-2016-10141 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2016-10141 being exploited in the wild.

**How severe is CVE-2016-10141?** Critical severity, with a CVSS score of 9.8, published 13 January 2017.

**Which products and versions are affected?** Artifex Software, Inc. MuJS before fa3d30fd18c348bb4b1f3858fb860f4fcd4b2045.

**Is there a fix for CVE-2016-10141?** A patch was published on 2017-01-12: Fixed in commit fa3d30fd18c348bb4b1f3858fb860f4fcd4b2045 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2016-10141 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2016-10141?** 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 the regemit function within regexp.c of Artifex MuJS. The flaw is triggered when the engine processes a regular expression containing deeply nested repetitions, which causes an overflow during the calculation of the required program size. This overflow subsequently leads to a heap-based buffer overflow when the engine attempts to write instructions into an undersized buffer. An attacker can exploit this by providing a malicious JavaScript file or regular expression string, potentially achieving arbitrary code execution or causing a denial of service (crash). The issue was addressed by implementing a maximum program size limit in commit fa3d30fd18c348bb4b1f3858fb860f4fcd4b2045.

## Affected products

- Artifex Software, Inc. MuJS before fa3d30fd18c348bb4b1f3858fb860f4fcd4b2045

## Timeline

- 2016-12-20: disclosed: Vulnerability reported to Ghostscript bug tracker
- 2017-01-12: patched: Fixed in commit fa3d30fd18c348bb4b1f3858fb860f4fcd4b2045
- 2017-01-13: advisory: NVD publication date

## References

- [http://git.ghostscript.com/?p=mujs.git%3Bh=fa3d30fd18c348bb4b1f3858fb860f4fcd4b2045](http://git.ghostscript.com/?p=mujs.git%3Bh=fa3d30fd18c348bb4b1f3858fb860f4fcd4b2045)
- [http://www.securityfocus.com/bid/95876](http://www.securityfocus.com/bid/95876)
- [https://bugs.ghostscript.com/show_bug.cgi?id=697448](https://bugs.ghostscript.com/show_bug.cgi?id=697448)

## Related threats

- [MuJS numeric conversion overflow in jsR_isindex](https://junglewise.ai/threats/cve-2026-88362-mujs-e892c9fdb-contains-an-incorrect-numeric-conversion)
- [Artifex Software MuJS integer overflow in MakeDay function](https://junglewise.ai/threats/cve-2017-5628-artifex-software-mujs-integer-overflow-in-makeday-function)
- [Artifex Software MuJS integer overflow in js_pushstring](https://junglewise.ai/threats/cve-2017-5627-artifex-software-mujs-integer-overflow-in-js-pushstring)
- [Artifex Software MuJS out-of-bounds read in chartorune](https://junglewise.ai/threats/cve-2016-9109-artifex-software-mujs-out-of-bounds-read-in-chartorune)
- [Artifex Software MuJS heap overflow in Fp_toString](https://junglewise.ai/threats/cve-2016-7564-artifex-software-mujs-heap-overflow-in-fp-tostring)
