Open-Source Security Intelligence

Know every vulnerability
before it knows you.

DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.

Search

GHSA-vgvf-m4fw-938j

MediumCVSS 6.9 / 10
Published Mar 5, 2026·Last modified Mar 23, 2026
Affected Components(0)

No affected components available

Description

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.

Risk Scores
Base Score
6.9

The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability.

Threat Intelligence
2.7

Limited exploitation activity has been observed. Close monitoring and planned remediation are recommended.

EPSS
0.19%

The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.

Exploit
Not available

We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.

Browse More

Scan your project

Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.

Checkout DevGuard