# CVE-2016-7564: Artifex Software MuJS heap overflow in Fp_toString

Source: https://junglewise.ai/threats/cve-2016-7564-artifex-software-mujs-heap-overflow-in-fp-tostring  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2017-01-18. Updated: 2026-05-13  
License: CC BY 4.0 with a link back

CVE-2016-7564 · Severity: high · CVSS 7.5 · Published 2017-01-18

MuJS is a lightweight JavaScript interpreter often embedded in other software to provide scripting capabilities. A vulnerability in how it handles function names and parameters can allow an attacker to crash the application by providing specially crafted input. This results in a denial of service, potentially disrupting operations or services that rely on the MuJS engine.

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

## Quick answers

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

**How severe is CVE-2016-7564?** High severity, with a CVSS score of 7.5, published 18 January 2017.

**Which products and versions are affected?** Artifex Software MuJS versions prior to commit a3a4fe8.

**Is there a fix for CVE-2016-7564?** A patch was published on 2016-09-20: Fixed in MuJS source repository Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

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

**Am I affected by CVE-2016-7564?** 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

A heap-based buffer overflow exists in the Fp_toString function within jsfunction.c of the MuJS library. The vulnerability is caused by an off-by-one error where the code fails to allocate sufficient memory for the terminating null byte when calculating the string length for a function's representation. An attacker can trigger this overflow by providing crafted input that populates function names or parameters in a specific way, leading to a memory corruption (WRITE of size 1) and a subsequent crash. The issue was fixed in commit a3a4fe840b80706c706e86160352af5936f292d8.

## Affected products

- Artifex Software MuJS versions prior to commit a3a4fe8

## Timeline

- 2016-09-20: disclosed: Vulnerability discovered and reported by Shi Ji
- 2016-09-20: patched: Fixed in MuJS source repository
- 2017-01-18: advisory: NVD publication date

## References

- [http://www.openwall.com/lists/oss-security/2016/09/21/5](http://www.openwall.com/lists/oss-security/2016/09/21/5)
- [http://www.openwall.com/lists/oss-security/2016/09/28/11](http://www.openwall.com/lists/oss-security/2016/09/28/11)
- [https://bugs.ghostscript.com/show_bug.cgi?id=697137](https://bugs.ghostscript.com/show_bug.cgi?id=697137)

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