CVE-2024-21531 git-shallow-clone Argument Injection vulnerability

Medium 5.3 Published Updated

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.

PackageAffectedFixed in
git-shallow-clone npmAll versions to 0.0.2None
git-shallow-clone npmAll versions to 0.0.2None

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.

Is CVE-2024-21531 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free