CVE-2014-8683: Cross-site Scripting in Gogs

gogs.io/gogs Updated 02 Oct 2025

Summary

29/06/2021
Yes i
Moderate
Not published

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 ↓

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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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 →

Share this vulnerability

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.

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