Command Injection Affecting @diez/generation package, versions *


Severity

Recommended
0.0
low
0
10

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

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
1.49% (88th 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 Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-DIEZGENERATION-1566823
  • published18 Aug 2021
  • disclosed18 Aug 2021
  • creditErik Krogh Kristensen

Introduced: 18 Aug 2021

CVE-2021-32830  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

There is no fixed version for @diez/generation.

Overview

@diez/generation is a This package deals with generating code for design languages based on its CodegenDesignLanguage, a way of describing a design language which is compatible with the design primitives provided by @diez/prefabs.

Affected versions of this package are vulnerable to Command Injection via the locateFont method.

PoC

Running a file with the below content will create a file named exploit.

const generation = require("@diez/generation");
generation.locateFont("foo'`touch /tmp/exploit` '", {});

References

CVSS Scores

version 3.1