CVE-2026-26195
JSON

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 packageVersionsReported by
gogs gogs< 0.14.2, before 0.14.2CVE List, NVD
gogs.io/gogs (Go)up to 0.13.3, all versionsGitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M6.9medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-79

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

Sources

SourceRecordLicence
CVE ListCVE-2026-26195 changed 2026-03-06CVE Terms of Use
GitHub Advisory DatabaseGHSA-vgvf-m4fw-938j changed 2026-03-23CC-BY-4.0
Go Vulnerability DatabaseGO-2026-4618 changed 2026-03-23CC-BY-4.0
NVDCVE-2026-26195 changed 2026-06-17Public domain