# CVE-2022-24433: steveukx simple-git command injection in fetch function

Source: https://junglewise.ai/threats/cve-2022-24433-steveukx-simple-git-command-injection-in-fetch-function  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-03-12. Updated: 2026-05-14  
License: CC BY 4.0 with a link back

CVE-2022-24433 · Severity: low · CVSS 3.1 · Published 2022-03-12

simple-git is a popular Node.js library used by developers to automate Git commands within their applications. A security flaw allows an attacker to execute unauthorized commands on the server by providing specially crafted input to the 'fetch' function. This could lead to a full system takeover, unauthorized data access, or disruption of services.

Technologies: [simple-git (npm)](https://junglewise.ai/threats/technologies/simple-git). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2022-24433 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-24433 being exploited in the wild.

**How severe is CVE-2022-24433?** Low severity, with a CVSS score of 3.1, published 12 March 2022.

**Which products and versions are affected?** simple-git (npm) SEMVER:introduced=0,fixed=3.3.0.

**Is there a fix for CVE-2022-24433?** Yes. simple-git (npm): upgrade to 3.3.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2022-24433 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2022-24433?** Check whether you run simple-git (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- simple-git (npm): upgrade to 3.3.0 or later

  ```sh
  npm install simple-git@3.3.0
  ```


## Technical details

The simple-git library before version 3.3.0 is vulnerable to command injection through argument injection. The root cause is the improper sanitization of the 'remote' and 'branch' parameters within the .fetch(remote, branch, handlerFn) function, which are passed directly to the underlying 'git fetch' subcommand. An attacker can supply git options such as '--upload-pack' as part of these parameters to break out of the intended command and execute arbitrary shell commands. This vulnerability can be exploited remotely if the application passes user-controlled input to the fetch function without validation. The issue is resolved in version 3.3.0.

## Affected products

- steveukx simple-git < 3.3.0

## Identifiers

- CVE-2022-24433
- GHSA-3f95-r44v-8mrg

## Timeline

- 2022-03-11: disclosed
- 2022-03-11: patched: Fixed in version 3.3.0
- 2022-03-12: advisory

## References

- [https://github.com/steveukx/git-js/pull/767](https://github.com/steveukx/git-js/pull/767)
- [https://github.com/steveukx/git-js](https://github.com/steveukx/git-js)
- [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)
- [https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2421245](https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2421245)
- [https://snyk.io/vuln/SNYK-JS-SIMPLEGIT-2421199](https://snyk.io/vuln/SNYK-JS-SIMPLEGIT-2421199)

## Related threats

- [simple-git command injection via trailer configuration](https://junglewise.ai/threats/cve-2026-102828-simple-git-an-interface-for-running-git-commands-in-any-node-js)
- [simple-git command injection via abbreviated Git options](https://junglewise.ai/threats/cve-2026-102827-simple-git-an-interface-for-running-git-commands-in-any-node-js)
- [simple-git arbitrary command execution via Git configuration injection](https://junglewise.ai/threats/cve-2026-102826-simple-git-an-interface-for-running-git-commands-in-any-node-js)
- [steveukx simple-git Remote Code Execution via --config flag injection](https://junglewise.ai/threats/cve-2026-6951-steveukx-simple-git-remote-code-execution-via-config-flag)
- [steveukx simple-git command injection via option-parsing bypass](https://junglewise.ai/threats/cve-2026-28291-steveukx-simple-git-command-injection-via-option-parsing-bypass)
