CVE-2024-21533 ggit is vulnerable to Arbitrary Argument Injection via the clone() API
Attackers can execute arbitrary commands via the clone() API due to lack of input sanitization and proper flag handling in the ggit library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2024-21533?
CVE-2024-21533 is a medium-severity command injection vulnerability in ggit, published on 8 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
All versions of the package ggit are vulnerable to Arbitrary Argument Injection via the clone() API, which allows specifying the remote URL to clone and the file on disk to clone to. The library does not sanitize for user input or validate a given URL scheme, nor does it properly pass command-line flags to the git binary using the double-dash POSIX characters (--) to communicate the end of options.
Weakness: CWE-88
Which versions are affected by CVE-2024-21533?
2 open source packages ship an affected version, including ggit.
| Package | Affected | Fixed in |
|---|---|---|
ggit npm | All versions to 2.4.12 | None |
ggit npm | All versions to 2.4.12 | None |
How do I fix CVE-2024-21533?
No fix has been published for CVE-2024-21533 yet. Limit exposure of the affected software until one is available.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2024-21533 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-21533 exists.
Public exploit code: 1 proofs of concept on GitHub.
Sources
Also known as GHSA-pr45-cg4x-ff4m.