CVE-2014-8683: Cross-site Scripting in Gogs
Summary
CVE-2014-8683: Cross-site Scripting in Gogs. Affects gogs.io/gogs versions >= 0.3.1, < 0.5.8. Fixed in 0.5.8. How to fix ↓
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.
No signup required · Results in about 60 seconds
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 allows users to collaborate on code, track issues, and perform various Git operations. However, versions 0.3.1-9 through 0.5.x before 0.5.8 are vulnerable to a cross-site scripting (XSS) attack.
Vulnerability Detail
The vulnerability exists in the 'models/issue.go' file of Gogs. It allows remote attackers to inject arbitrary web script or HTML through the 'text' parameter of the 'api/v1/markdown' endpoint. This can lead to the execution of malicious code in the context of other users' browsers, potentially compromising their accounts or stealing sensitive information. The vulnerability has a moderate severity rating and is classified under CWE-79.
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
If upgrading to the latest version is not immediately feasible, a temporary workaround is to disable the 'api/v1/markdown' endpoint or implement input validation and output encoding to prevent the execution of malicious scripts. Here is an example of input validation in Go:
import (
"html"
"net/http"
)
func sanitizeInput(input string) string {
return html.EscapeString(input)
}
By sanitizing the 'text' parameter using the 'html.EscapeString' function, the XSS vulnerability can be mitigated.
Conclusion
In conclusion, the Gogs version 0.3.1-9 through 0.5.x before 0.5.8 is vulnerable to a cross-site scripting (XSS) attack. It is crucial to upgrade to the latest version or apply the recommended workaround to mitigate the risk. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for gogs.io/gogs →
FAQ
The vulnerability allows attackers to inject malicious scripts or HTML into Gogs, potentially compromising user accounts and stealing sensitive information.
You can use the Vulert Playground (https://vulert.com/scanner) to check if your Gogs installation is affected by this vulnerability. It analyzes your Gopkg.lock file and provides real-time alerts for open-source vulnerabilities.
There are no known public exploits specifically targeting this vulnerability in Gogs. However, it is important to apply the recommended fixes to prevent potential attacks.
While applying the workaround can provide temporary protection, it is strongly recommended to upgrade to the latest version of Gogs. Upgrading ensures that you have all the latest security patches and bug fixes.
You can find more information about this vulnerability in the official Gogs advisory database: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/06/GHSA-9hx4-qm7h-x84j/GHSA-9hx4-qm7h-x84j.json
Related vulnerabilities
Recent vulnerabilities recorded for gogs.io/gogs.