CVE-2026-52807: Gogs stored DOM-based XSS in milestone dropdown on New Issue page

CVE-2026-52807 · Severity: high · CVSS 4 · Published 2026-06-24

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.

Technologies: gogs.io/gogs (Go), Gogs. Vendors: Go, Gogs.

Quick answers

Is CVE-2026-52807 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-52807 being exploited in the wild.
How severe is CVE-2026-52807?
High severity, with a CVSS score of 4, published 24 June 2026.
Which products and versions are affected?
gogs.io/gogs (Go) < 0.14.3, SEMVER:introduced=0, SEMVER:introduced=0,fixed=0.14.3; Gogs < 0.14.3.
Is there a fix for CVE-2026-52807?
Yes. gogs.io/gogs (Go): upgrade to 0.14.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-52807 attacked?
It is attacked over the network, in a network appliance.
Am I affected by CVE-2026-52807?
Check whether you run gogs.io/gogs (Go) or Gogs at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • gogs.io/gogs (Go): upgrade to 0.14.3 or later
    go get gogs.io/gogs@v0.14.3

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

Identifiers

  • CVE-2026-52807
  • GHSA-vcm5-gvmp-78mp
  • GO-2026-5661

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

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.