All vulnerabilities

Servers and applications

GHSA-vhf5-f34f-vhq9

Stored XSS via LDAP bind-DN username rendered unsanitized in Gogs issue and dashboard pages

Severity
High 8.7
Published
24 Nov 2026
Last changed
24 Nov 2026
Added to UpHeron
24 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

Gogs renders an issue author's username as trusted HTML on issue and dashboard pages. When Gogs is configured for LDAP "bind DN" authentication, the username that becomes a local Gogs account is taken from an LDAP attribute (for example cn or displayName) that is never checked for HTML characters, and the issue templates emit that username through the Safe template helper without first running it through Sanitize. A user whose LDAP attribute value contains an HTML payload such as therefore produces a stored cross-site scripting payload that executes in the browser of anyone who views an issue they opened or the dashboard issue list.

The Name field of a user is rendered verbatim as HTML in several issue templates, while the sibling display path and other templates correctly sanitize first. Three guards that would normally neutralize HTML in a username are each absent on this path: the LDAP bind-DN query sanitizer permits < and >, account creation performs no character-set validation,…

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

Affected software

SoftwareAffected versions
GogsServers and applications · github:gogs/gogs
  • Every version up to 0.14.3

About Gogs

free forge based on Git written in Go

From Wikidata, CC0 1.0.
Docker Hub pulls
94,097,312Docker Hub, 22 Nov 2026
GitHub stars
47,981GitHub, 22 Nov 2026
Forks
5,081GitHub, 22 Nov 2026
Latest release
v0.14.4GitHub, 22 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