CVE-2021-26543 Command injection in git-parse

High 8.8 Published Updated

The git-parse library allows command injection via the gitDiff function, enabling attackers to execute arbitrary commands on systems using this npm package.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2021-26543?

CVE-2021-26543 is a high-severity command injection vulnerability in n/a, published on 6 May 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

The "gitDiff" function in Wayfair git-parse <=1.0.4 has a command injection vulnerability. Clients of the git-parse library are unlikely to be aware of this, so they might unwittingly write code that contains a vulnerability. The issue has been resolved in version 1.0.5.

Weakness: CWE-78

Which versions are affected by CVE-2021-26543?

2 open source packages ship an affected version, including git-parse. It affects 1 product.

PackageAffectedFixed in
git-parse npmAll versions1.0.5
git-parse npmAll versions1.0.5

Products include Wayfair Git-Parse.

How do I fix CVE-2021-26543?

Upgrade git-parse to 1.0.5 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2021-26543 being exploited?

There is no known exploitation of CVE-2021-26543 in the wild and no public exploit code.

Sources

Also known as GHSA-m744-2jj8-vpfv.

Is CVE-2021-26543 in your software?

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

Check your SBOMs for free