GHSA-49mg-94fc-2fx6 Command Injection in npm-git-publish

Not scored Published

Attackers can execute arbitrary code via unsanitized input in the publish function, affecting users of the npm-git-publish library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
None listed

What is GHSA-49mg-94fc-2fx6?

GHSA-49mg-94fc-2fx6 is a command injection vulnerability in npm-git-publish, published on 4 Sep 2020. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

All versions of npm-git-publish are vulnerable to Command Injection. The package fails to sanitize input and passes it directly to an execSync call, which may allow attackers to execute arbitrary code in the system. The publish function is vulnerable through the gitRemoteUrl variable.

Recommendation

No fix is currently available. Consider using an alternative package until a fix is made available.

Which versions are affected by GHSA-49mg-94fc-2fx6?

2 open source packages ship an affected version, including npm-git-publish.

PackageAffectedFixed in
npm-git-publish npmFrom 0.0.0None
npm-git-publish npmFrom 0.0.0None

How do I fix GHSA-49mg-94fc-2fx6?

No fix has been published for GHSA-49mg-94fc-2fx6 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 GHSA-49mg-94fc-2fx6 being exploited?

There is no known exploitation of GHSA-49mg-94fc-2fx6 in the wild and no public exploit code.

Sources

Is GHSA-49mg-94fc-2fx6 in your software?

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

Check your SBOMs for free