All vulnerabilities

Servers and applications

GHSA-6972-pq3q-8w9r

Stored cross-site scripting in Gogs commit subjects through the external issue tracker format

Severity
High 8.7
Published
18 Nov 2026
Last changed
18 Nov 2026
Added to UpHeron
18 Nov 2026
Weakness
Cross-site scripting (CWE-79)
Attack
Over the network · Needs a user account · Needs someone to click or open something
Attacker can
Read data · Change data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Sources
Project advisories (GitHub)

Description

A repository administrator can set the external issue tracker format to a javascript: URL. Commit subjects that contain an issue reference such as #1 are then rendered as links whose target is that javascript: URL. The web API returns the link HTML without sanitization, and the React client inserts it with dangerouslySetInnerHTML. When a visitor clicks the reference, the script runs in the Gogs origin with the visitor's session.

The independent reviewer demonstrated the cross-user case: a normal user's public repository ran script in a signed-in site administrator's session after the administrator clicked the reference. It confirmed that this is stored XSS across principals, not self-XSS, and that the behavior is not intended.

The same class was reported in 2018 as issue #5545 and fixed by piping the commit message through the server-side sanitizer. The recent React migration removed the server templates and returned the raw HTML to the browser, so the sanitizer is no longer…

From gogs/gogs's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
GogsServers and applications · github:gogs/gogs
  • Version 0.15.0+dev

About Gogs

free forge based on Git written in Go

From Wikidata, CC0 1.0.
Docker Hub pulls
94,040,857Docker Hub, 15 Nov 2026
GitHub stars
47,939GitHub, 15 Nov 2026
Forks
5,082GitHub, 15 Nov 2026
Latest release
v0.14.4GitHub, 15 Nov 2026
Released
12 Nov 2026GitHub
Developer
FLOSS contributorWikidata
License
Expat licenseWikidata
Written in
Go, Cascading Style Sheets, JavaScriptWikidata
First released
11 Feb 2014Wikidata
First published on GitHub
12 Feb 2014GitHub

References