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

- Severity: Critical (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2020-09-04T17:32:49.000Z
- Modified: 2020-08-31T19:00:00.000Z
- Weaknesses: CWE-77

## 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.

(As written by GitHub Advisory Database.)

## Affected

- npm-git-publish (npm): from 0.0.0

## References

- <https://hackerone.com/reports/730121> (web)
- <https://www.npmjs.com/advisories/1458> (web)

## Sources

- GitHub Advisory Database: [GHSA-49mg-94fc-2fx6](https://github.com/advisories/GHSA-49mg-94fc-2fx6), CC-BY-4.0, modified 2020-08-31

---

Page: https://cve.day/GHSA-49mg-94fc-2fx6 · Whole record: https://cve.day/GHSA-49mg-94fc-2fx6.json · Rebuilt by cve.day 2026-11-25T22:56:43.969Z
