# gnuplot command injection in plot title

Source: https://junglewise.ai/threats/gnuplot-command-injection-in-plot-title-5ce2e6bb  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2020-09-04. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: info · CVSS 9.8 · Published 2020-09-04

gnuplot is a graphing utility used to generate plots and charts. This vulnerability allows attackers to inject arbitrary system commands through unsanitized plot title parameters, potentially enabling code execution on systems where user-controlled titles are passed to gnuplot. An attacker could exploit this to execute malicious commands, steal data, or compromise the system.

Technologies: [gnuplot (npm)](https://junglewise.ai/threats/technologies/gnuplot). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Informational severity, with a CVSS score of 9.8, published 4 September 2020.

**Which products and versions are affected?** gnuplot (npm) all versions.

**Is there a fix for This vulnerability?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is This vulnerability attacked?** It is attacked over the network.

**Am I affected?** Check whether you run gnuplot (npm) at an affected version. 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

The vulnerability is a command injection flaw (CWE-77) in the gnuplot npm package affecting all versions. The library fails to properly sanitize the plot title parameter before passing it to the underlying gnuplot command-line tool. An attacker who can control the title value supplied to the library can inject newlines and gnuplot commands (including the system() function) to execute arbitrary shell commands. The attack requires the ability to pass a malicious title to the gnuplot function; no authentication is needed if titles are sourced from user input. The proof-of-concept demonstrates creating arbitrary files via injected system() calls. No patch was available at the time of disclosure.

## Affected products

- npm gnuplot all versions

## Timeline

- 2020-09-04: disclosed
- 2020-09-04: other: No fix available at disclosure; issue remains unfixed

## References

- [https://www.npmjs.com/advisories/1440](https://www.npmjs.com/advisories/1440)
