Quick answers
- Is CVE-2022-24066 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2022-24066 being exploited in the wild.
- How severe is CVE-2022-24066?
- Low severity, with a CVSS score of 3.1, published 2 April 2022.
- Which products and versions are affected?
- simple-git (npm) SEMVER:introduced=0,fixed=3.5.0.
- Is there a fix for CVE-2022-24066?
- Yes. simple-git (npm): upgrade to 3.5.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2022-24066 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2022-24066?
- 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.5.0 or later
npm install simple-git@3.5.0
Technical details
The simple-git library before version 3.5.0 is vulnerable to command injection (specifically argument injection, CWE-88). This occurs because the library fails to properly sanitize or block the '--upload-pack' argument when executing 'git clone' operations. While a previous fix (CVE-2022-24433) addressed this for 'git fetch', the 'git clone' vector remained open. An attacker can provide a malicious URL or argument list containing '--upload-pack' followed by arbitrary shell commands, which Git then executes. This can be exploited remotely if the application accepts user-supplied repository URLs. The vulnerability is fixed in version 3.5.0.
Affected products
- steveukx simple-git < 3.5.0
Identifiers
- CVE-2022-24066
- GHSA-28xr-mwxg-3qc8
Timeline
- 2022-03-27: other: Proof of concept published by researcher
- 2022-03-29: patched: Version 3.5.0 released
- 2022-04-01: disclosed: NVD publication date
- 2022-04-02: advisory: GitHub Advisory published
References
- https://github.com/steveukx/git-js/commit/2040de601c894363050fef9f28af367b169a56c5
- https://gist.github.com/lirantal/a930d902294b833514e821102316426b
- https://github.com/steveukx/git-js
- https://github.com/steveukx/git-js/releases/tag/simple-git%403.5.0
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2434820
- https://snyk.io/vuln/SNYK-JS-SIMPLEGIT-2434306