.. / CVE-2014-8682

Exploit for Gogs (Go Git Service) - SQL Injection (CVE-2014-8682)

Description:

Multiple SQL injection vulnerabilities in Gogs (aka Go Git Service) 0.3.1-9 through 0.5.x before 0.5.6.1105 Beta allow remote attackers to execute arbitrary SQL commands via the q parameter to (1) api/v1/repos/search, which is not properly handled in models/repo.go, or (2) api/v1/users/search, which is not properly handled in models/user.go.

Proof of Concept

PoC exploit

Nuclei Template

View the template here CVE-2014-8682.yaml

Validate with Nuclei

echo "$URL" | nuclei -t ~/nuclei-templates/http/cves/2014/CVE-2014-8682.yaml
Copy

Try the exploit in a lab environment:

Lab Machine Link
Hack The Box Health Go to Practice

References:

https://exchange.xforce.ibmcloud.com/vulnerabilities/98694
https://www.exploit-db.com/exploits/35238
http://packetstormsecurity.com/files/129117/Gogs-Repository-Search-SQL-Injection.html
https://github.com/gogits/gogs/commit/0c5ba4573aecc9eaed669e9431a70a5d9f184b8d
https://nvd.nist.gov/vuln/detail/CVE-2014-8682
http://seclists.org/fulldisclosure/2014/Nov/33