CVE-2014-8682: SQL Injection in Gogs

gogs.io/gogs Updated 02 Oct 2025

Summary

29/06/2021
Yes i
High
7.3

CVE-2014-8682: SQL Injection in Gogs. Affects gogs.io/gogs versions >= 0.3.1, < 0.5.8. Fixed in 0.5.8. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Gogs (aka Go Git Service) is an open-source self-hosted Git service written in Go. It provides a lightweight and efficient way to manage repositories, users, and organizations. Gogs is vulnerable to multiple SQL injection vulnerabilities in versions 0.3.1-9 through 0.5.x before 0.5.6.1105 Beta. These vulnerabilities allow remote attackers to execute arbitrary SQL commands by exploiting the 'q' parameter in the 'api/v1/repos/search' and 'api/v1/users/search' endpoints.

Vulnerability Detail

The SQL injection vulnerabilities in Gogs can be exploited by remote attackers to execute arbitrary SQL commands. The 'q' parameter in the 'api/v1/repos/search' and 'api/v1/users/search' endpoints is not properly handled, leading to the execution of unauthorized SQL queries. This can result in unauthorized access to sensitive information, modification of data, or even the complete compromise of the affected system. The Common Vulnerabilities and Exposures (CVE) identifier for this vulnerability is CVE-2014-8682. The vulnerability has a CVSS v3 score of 7.3, indicating a high severity level.

How To Fix

Latest published version: v0.13.3 as of 22 Oct 2026

go get gogs.io/gogs@v0.13.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.5.8

This is the first release that contains the fix.

go get gogs.io/gogs@v0.5.8

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can sanitize and validate user input before passing it to the 'q' parameter in the affected endpoints. This can be done by implementing proper input validation and parameter binding techniques. Here is an example of how to sanitize user input in Go:

def sanitizeInput(input string) string {
  // Implement input sanitization logic here
  return sanitizedInput
}

// Example usage
q := sanitizeInput(userInput)
// Use the sanitized input in the 'q' parameter

Conclusion

In conclusion, Gogs versions 0.3.1-9 through 0.5.x before 0.5.6.1105 Beta are vulnerable to SQL injection. This can be exploited by remote attackers to execute arbitrary SQL commands, potentially leading to unauthorized access or data compromise. To mitigate this vulnerability, it is crucial to upgrade to Gogs version 0.5.8 or later. Additionally, implementing proper input validation and sanitization techniques can serve as a temporary workaround. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for gogs.io/gogs →

Share this vulnerability

FAQ

Gogs (Go Git Service) is an open-source self-hosted Git service written in Go. It provides a lightweight and efficient way to manage repositories, users, and organizations.

Versions 0.3.1-9 through 0.5.x before 0.5.6.1105 Beta of Gogs are affected by this SQL injection vulnerability.

This vulnerability allows remote attackers to execute arbitrary SQL commands, potentially leading to unauthorized access to sensitive information, data modification, or complete system compromise.

To fix this vulnerability, it is recommended to upgrade to Gogs version 0.5.8 or later, which includes a patch for the SQL injection vulnerability.

As a temporary workaround, users can sanitize and validate user input before passing it to the affected endpoints. Implementing proper input validation and parameter binding techniques can help mitigate the risk of SQL injection attacks.

Related vulnerabilities

Recent vulnerabilities recorded for gogs.io/gogs.

How To Fix

Latest published version: v0.13.3 as of 22 Oct 2026

go get gogs.io/gogs@v0.13.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.5.8

This is the first release that contains the fix.

go get gogs.io/gogs@v0.5.8

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback