# CVE-2017-5627: Artifex Software MuJS integer overflow in js_pushstring

Source: https://junglewise.ai/threats/cve-2017-5627-artifex-software-mujs-integer-overflow-in-js-pushstring  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2017-01-30. Updated: 2026-05-13  
License: CC BY 4.0 with a link back

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

MuJS, a lightweight JavaScript interpreter used in various software applications, is vulnerable to a memory corruption issue when processing malformed JavaScript files. An attacker could provide a specially crafted script that, when executed by the interpreter, causes the application to crash or potentially allows for unauthorized data access. This could lead to a loss of service or compromise the security of the system running the software.

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

## Quick answers

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

**How severe is CVE-2017-5627?** High severity, with a CVSS score of 7.8, published 30 January 2017.

**Which products and versions are affected?** Artifex Software, Inc. MuJS before commit 4006739a28367c708dea19aeb19b8a1a9326ce08.

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

**How is CVE-2017-5627 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2017-5627?** 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 4006739a28367c708dea19aeb19b8a1a9326ce08. The root cause is located in the jsR_setproperty function within jsrun.c, which fails to validate that an array length is positive. When a specially crafted JavaScript file with a negative array length is parsed, it triggers an integer overflow in the js_pushstring function. This leads to an invalid memory read (segmentation fault) during string operations like strlen. An attacker can exploit this by tricking a user or automated system into processing a malicious JS file, potentially leading to arbitrary code execution or a denial-of-service (DoS) condition. The issue was fixed by ensuring array lengths are strictly positive.

## Affected products

- Artifex Software, Inc. MuJS before commit 4006739a28367c708dea19aeb19b8a1a9326ce08

## Timeline

- 2017-01-23: disclosed: Bug reported to Ghostscript Bugzilla
- 2017-01-24: patched: Fixed in commit 4006739a28367c708dea19aeb19b8a1a9326ce08
- 2017-01-30: advisory: NVD publication date

## References

- [http://git.ghostscript.com/?p=mujs.git%3Bh=4006739a28367c708dea19aeb19b8a1a9326ce08](http://git.ghostscript.com/?p=mujs.git%3Bh=4006739a28367c708dea19aeb19b8a1a9326ce08)
- [http://www.securityfocus.com/bid/95856](http://www.securityfocus.com/bid/95856)
- [https://bugs.ghostscript.com/show_bug.cgi?id=697497](https://bugs.ghostscript.com/show_bug.cgi?id=697497)

## 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 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)
- [Artifex Software MuJS out-of-bounds read in chartorune](https://junglewise.ai/threats/cve-2016-7563-artifex-software-mujs-out-of-bounds-read-in-chartorune)
