VDB
KO
HIGH 8.8

GHSA-77c7-pq4r-6mcq

degit has a Command Injection issue

Quick fix

GHSA-77c7-pq4r-6mcq — degit: upgrade to the fixed version with the command below.

npm install degit@2.8.6

Details

Versions of the package degit before 2.8.6, from 3.0.0 and before 3.3.1 are vulnerable to Command Injection due to improper sanitisation of user input for git shell commands directly invoked with exec() method by _cloneWithGit() and fetchRefs() functions. An attacker can execute arbitrary operating system commands as the process user by supplying a specially crafted git repository name.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm / degit
Introduced in: 0 Fixed in: 2.8.6
Fix npm install degit@2.8.6
npm / degit
Introduced in: 3.0.0 Fixed in: 3.3.1
Fix npm install degit@3.3.1

References