Executive brief
Gogs is an open-source self-hosted Git service used by developers to manage source code. A security flaw in the 'New Issue' page allows an attacker to embed malicious scripts into milestone names. If another user interacts with the milestone dropdown menu, that script could execute in their browser, potentially leading to unauthorized actions or the theft of sensitive session information.
Technical details
A stored DOM-based XSS vulnerability exists in Gogs prior to version 0.14.3 within the 'new_form.tmpl' template. While Go's default auto-escaping handles initial rendering, the Semantic UI 2.4.2 dropdown component used in the milestone selector has 'preserveHTML: true' enabled by default. When a user selects a milestone, the component's 'set.text()' method passes the decoded text content to jQuery's '.html()' function, which re-parses and executes any embedded HTML/JavaScript. An attacker with repository write access can create a malicious milestone name that executes arbitrary JavaScript in the browser of any user interacting with the dropdown on the New Issue page. This has been fixed in version 0.14.3 by applying the 'Sanitize' filter to milestone names.
Affected products
- Gogs Gogs < 0.14.3
Timeline
- 2026-06-06: patched: Fix merged into main branch
- 2026-06-07: advisory: Release v0.14.3 published
- 2026-06-24: disclosed: NVD publication date