CVE-2024-21531 git-shallow-clone Argument Injection vulnerability
Attackers can execute arbitrary commands via unsanitized input in the gitShallowClone function of the git-shallow-clone npm package.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2024-21531?
CVE-2024-21531 is a medium-severity command injection vulnerability in git-shallow-clone, published on 1 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
All versions of the package git-shallow-clone are vulnerable to Command injection due to missing sanitization or mitigation flags in the process variable of the gitShallowClone function.
Weakness: CWE-78
Which versions are affected by CVE-2024-21531?
2 open source packages ship an affected version, including git-shallow-clone.
| Package | Affected | Fixed in |
|---|---|---|
git-shallow-clone npm | All versions to 0.0.2 | None |
git-shallow-clone npm | All versions to 0.0.2 | None |
How do I fix CVE-2024-21531?
No fix has been published for CVE-2024-21531 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-21531 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-21531 exists.
Sources
Also known as GHSA-qwrq-vxvw-537r.