Junglewise Threat Intelligence

CVE-2022-24066: steveukx simple-git command injection in git clone

CVE-2022-24066 · Severity: low · CVSS 3.1 · Published 2022-04-02

Technologies: Steveukx Simple-Git. Vendors: npm.

Executive brief

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 a specially crafted Git repository URL. This could lead to a full system compromise, data theft, or service disruption.

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

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

Related threats