The package ungit before 1.5.20 are vulnerable to Remote Code Execution (RCE) via argument injection. The issue occurs when calling the /api/fetch endpoint. User controlled values (remote and ref) are passed to the git fetch command. By injecting some git options it was possible to get arbitrary command execution.
References
- https://nvd.nist.gov/vuln/detail/CVE-2022-25766
- https://github.com/FredrikNoren/ungit/pull/1510
- https://github.com/FredrikNoren/ungit/blob/master/CHANGELOG.md%231520
- https://snyk.io/vuln/SNYK-JS-UNGIT-2414099
- https://github.com/FredrikNoren/ungit/pull/1511
- https://github.com/advisories/GHSA-hf8c-xr89-vfm5