PT-2026-23486 · Gogs · Gogs

Rezmoss

·

Published

2026-02-13

·

Updated

2026-03-25

·

CVE-2026-26195

CVSS v4.0

6.9

Medium

VectorAV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions Gogs versions prior to 0.14.2
Description Gogs, a self-hosted Git service, contains a stored cross-site scripting (XSS) issue due to unsafe template rendering. The issue arises from mixing user input with permissive sanitizer handling of data URLs and the use of the safe() function, which disables escaping. Specifically, committer names on branch pages and arguments within locale files are vulnerable to injection. An attacker who can inject commit metadata, such as author or committer name, can trigger script execution on affected pages, potentially leading to session abuse, Cross-Site Request Forgery (CSRF) token theft, or unauthorized actions. The safe() function in internal/template/template.go allows bypassing escaping mechanisms. The vulnerability is present in templates/repo/branches/overview.tmpl, templates/repo/branches/all.tmpl, and templates/repo/wiki/view.tmpl. The locale file conf/locale/locale en-US.ini also contributes to the issue by injecting raw arguments.
Recommendations Update to version 0.14.2 or later.

Exploit

Fix

XSS

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

BDU:2026-06147
CVE-2026-26195
GHSA-VGVF-M4FW-938J
GO-2026-4618
SUSE-SU-2026:1042-1

Affected Products

Gogs