---
title: "GHSA-28xr-mwxg-3qc8: Command injection in simple-git"
description: "High severity. Command injection in simple-git. Affects simple-git; fixed in 3.5.0."
url: https://inlinr.com/advisories/GHSA-28xr-mwxg-3qc8
lang: en
---

[Packages](https://inlinr.com/packages) / [simple-git](https://inlinr.com/packages/simple-git) / [Security](https://inlinr.com/packages/simple-git/security)

High Vulnerability GHSA-28xr-mwxg-3qc8 CVE-2022-24066 Published 2 Apr 2022

# Command injection in simple-git

Your version 

Affected releases · [simple-git](https://inlinr.com/packages/simple-git)

- 3.x 3.0.1 – 3.4.0 Fixed in 3.5.0
- 2.x and older 0.0.1 – 2.48.0 No fix, no longer updated

On 3.x, the newest line:

```
npm install simple-git@3.5.0
```

Every release on a timeline

4.x 

1. Not affected

4.0.0 – 4.1.0  
4 releases, latest

3.x 

1. Affected

3.0.1 – 3.4.0  
10 releases
2. Fixed

3.5.0 – 3.36.0  
42 releases

2.x 

1. Affected

2.0.0 – 2.48.0  
63 releases

1.x 

1. Affected

1.0.0 – 1.132.0  
139 releases

0.x 

1. Affected

0.0.1 – 0.17.0  
20 releases

278 stable releases of simple-git, oldest to newest, one row per major.

## What happens

`simple-git` (maintained as [git-js](https://github.com/steveukx/git-js "https://github.com/steveukx/git-js") named repository on GitHub) is a light weight interface for running git commands in any node.js application.The package simple-git before 3.5.0 are vulnerable to Command Injection due to an incomplete fix of [CVE-2022-24433](https://security.snyk.io/vuln/SNYK-JS-SIMPLEGIT-2421199 "https://security.snyk.io/vuln/SNYK-JS-SIMPLEGIT-2421199") which only patches against the git fetch attack vector. A similar use of the --upload-pack feature of git is also supported for git clone, which the prior fix didn't cover. A fix was released in simple-git@3.5.0.

## How it is exploited

Exploitable over the network, with no account and no action from a user.

- **Confidentiality**: high
- **Integrity**: high
- **Availability**: high

CVSS:3.1/​AV:N/​AC:H/​PR:N/​UI:N/​S:U/​C:H/​I:H/​A:H

## References

- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2022-24066 "https://nvd.nist.gov/vuln/detail/CVE-2022-24066")  
nvd.nist.gov/vuln/detail/CVE-2022-24066
- [Fix commit](https://github.com/steveukx/git-js/commit/2040de601c894363050fef9f28af367b169a56c5 "https://github.com/steveukx/git-js/commit/2040de601c894363050fef9f28af367b169a56c5")  
2040de6
- [Reference](https://gist.github.com/lirantal/a930d902294b833514e821102316426b "https://gist.github.com/lirantal/a930d902294b833514e821102316426b")  
gist.github.com/lirantal/a930d902294b833514e821…
- [Package](https://github.com/steveukx/git-js "https://github.com/steveukx/git-js")  
github.com/steveukx/git-js
- [Reference](https://github.com/steveukx/git-js/releases/tag/simple-git%403.5.0 "https://github.com/steveukx/git-js/releases/tag/simple-git%403.5.0")  
github.com/steveukx/git-js/releases/tag/simple-…
- [Reference](https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2434820 "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2434820")  
snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2434820
- [Reference](https://snyk.io/vuln/SNYK-JS-SIMPLEGIT-2434306 "https://snyk.io/vuln/SNYK-JS-SIMPLEGIT-2434306")  
snyk.io/vuln/SNYK-JS-SIMPLEGIT-2434306

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
