GHSA-49mg-94fc-2fx6 Command Injection in npm-git-publish
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.
| Package | Affected | Fixed in |
|---|---|---|
npm-git-publish npm | From 0.0.0 | None |
npm-git-publish npm | From 0.0.0 | None |
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.