6.9medium
Gogs: Stored XSS in branch and wiki views through author and committer names
- Severity
- 6.9medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.23% (higher than 14% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-vgvf-m4fw-938jGO-2026-4618
Description
Gogs is an open source self-hosted Git service. Prior to version 0.14.2, stored xss is still possible through unsafe template rendering that mixes user input with safe plus permissive sanitizer handling of data urls. This issue has been patched in version 0.14.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| gogs gogs | < 0.14.2, before 0.14.2 | CVE List, NVD |
| gogs.io/gogs (Go) | up to 0.13.3, all versions | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 6.9medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
Gogs is an open source self-hosted Git service. Prior to version 0.14.2, stored xss is still possible through unsafe template rendering that mixes user input with safe plus permissive sanitizer handling of data urls. This issue has been patched in version 0.14.2.
GitHub Advisory Database
Summary
Stored XSS is still possible through unsafe template rendering that mixes user input with safe() plus permissive sanitizer handling of data URLs.
Details
safe() still turns off escaping:
- internal/template/template.go
func safe(raw string) template.HTML { return template.HTML(raw) }
Branch pages still render committer names using safe():
- templates/repo/branches/overview.tmpl
- templates/repo/branches/all.tmpl
- templates/repo/wiki/view.tmpl
The locale still injects a raw second argument: conf/locale/locale_en-US.ini (branches.updated_by = updated %[1]s by %[2]s)
Impact
An attacker who can inject commit metadata such as author/committer name can trigger script execution on affected pages, leading to session abuse, CSRF token theft, or unauthorized actions.
Recommended Fix
- Untrusted arguments should be escaped before being used in translations.
- Data URLs should be limited or blocked in the sanitizer.
Remediation
A fix is available at https://github.com/gogs/gogs/releases/tag/v0.14.2.
Go Vulnerability Database
Gogs: Stored XSS in branch and wiki views through author and committer names in gogs.io/gogs
NVD (es)
Gogs es un servicio Git autoalojado de código abierto. Antes de la versión 0.14.2, el XSS almacenado sigue siendo posible a través de la renderización insegura de plantillas que mezcla la entrada del usuario con un manejo seguro y permisivo del saneador de las URL de datos. Este problema ha sido parcheado en la versión 0.14.2.
References
| https://github.com/gogs/gogs/security/advisories/GHSA-vgvf-m4fw-938j | advisory, vendor-advisory, web | |
| https://github.com/gogs/gogs/pull/8176 | issue-tracking, web | |
| https://github.com/gogs/gogs/commit/ac21150a53bef3a3061f4da787ab193a8d68ecfc | patch, web | |
| https://github.com/gogs/gogs/releases/tag/v0.14.2 | release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-26195 | advisory | |
| https://github.com/gogs/gogs | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-26195 changed 2026-03-06 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-vgvf-m4fw-938j changed 2026-03-23 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4618 changed 2026-03-23 | CC-BY-4.0 |
| NVD | CVE-2026-26195 changed 2026-06-17 | Public domain |