---
title: "GHSA-3f95-r44v-8mrg: Command injection in simple-git"
description: "High severity. Command injection in simple-git. Affects simple-git; fixed in 3.3.0."
url: https://inlinr.com/advisories/GHSA-3f95-r44v-8mrg
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-3f95-r44v-8mrg CVE-2022-24433 Published 12 Mar 2022

# Command injection in simple-git

Your version 

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

- 3.x 3.0.1 – 3.2.6 Fixed in 3.3.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.3.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.2.6  
8 releases
2. Fixed

3.3.0 – 3.36.0  
44 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

The package simple-git before 3.3.0 is vulnerable to Command Injection via argument injection. When calling the .fetch(remote, branch, handlerFn) function, both the remote and branch parameters are passed to the git fetch subcommand. By injecting some git options, it was possible to get arbitrary command execution.

## 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-24433 "https://nvd.nist.gov/vuln/detail/CVE-2022-24433")  
nvd.nist.gov/vuln/detail/CVE-2022-24433
- [Pull request](https://github.com/steveukx/git-js/pull/767 "https://github.com/steveukx/git-js/pull/767")  
#767
- [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.3.0 "https://github.com/steveukx/git-js/releases/tag/simple-git%403.3.0")  
github.com/steveukx/git-js/releases/tag/simple-…
- [Reference](https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2421245 "https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2421245")  
snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2421245
- [Reference](https://snyk.io/vuln/SNYK-JS-SIMPLEGIT-2421199 "https://snyk.io/vuln/SNYK-JS-SIMPLEGIT-2421199")  
snyk.io/vuln/SNYK-JS-SIMPLEGIT-2421199

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.
