CVE-2014-8682 SQL Injection in Gogs
Remote attackers can execute arbitrary SQL commands via search parameters in Gogs, potentially reading or modifying database contents.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2014-8682?
CVE-2014-8682 is a high-severity SQL injection vulnerability in n/a, published on 21 Nov 2014. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-89
Which versions are affected by CVE-2014-8682?
3 open source packages ship an affected version, including gogs.io/gogs. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
gogs.io/gogs Go | From 0.3.1 | 0.5.8 |
gogs.io/gogs Go | From 0.3.1 | 0.5.8 |
gogs.io/gogs Go | From 0.3.1 | 0.5.8 |
Products include Gogits Gogs.
How do I fix CVE-2014-8682?
Upgrade gogs.io/gogs to 0.5.8 or later.
Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.
Is CVE-2014-8682 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2014-8682 exists.
Public exploit code: 1 Exploit-DB entry, 1 Nuclei template and 1 proofs of concept on GitHub.
Other vulnerabilities in n/a
Sources
Also known as GHSA-g6xv-8q23-w2q3, GO-2022-0831.