CVE-2026-52798
Received Received - Intake
Stored XSS in Gogs via Malicious Jupyter Notebook Preview

Publication date: 2026-06-24

Last updated on: 2026-06-24

Assigner: GitHub, Inc.

Description
Gogs is an open source self-hosted Git service. Prior to 0.14.3, although .ipynb previews are sanitized on the server side via /-/api/sanitize_ipynb, the inserted content is re-rendered on the client side without sanitization using marked() on elements with the .nb-markdown-cell class. During this process, links containing schemes such as javascript: can be regenerated. As a result, when a victim views an attacker-crafted .ipynb file and clicks the link, arbitrary JavaScript is executed in the Gogs origin, leading to a click-based Stored XSS. This vulnerability is fixed in 0.14.3.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-24
Last Modified
2026-06-24
Generated
2026-06-25
AI Q&A
2026-06-25
EPSS Evaluated
N/A
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
gogs gogs to 0.14.3 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability exists in Gogs, an open source self-hosted Git service, in versions prior to 0.14.3. Although .ipynb file previews are sanitized on the server side, the content is re-rendered on the client side without proper sanitization. Specifically, links with dangerous schemes like javascript: can be regenerated during client-side rendering. When a user views a maliciously crafted .ipynb file and clicks such a link, arbitrary JavaScript code executes within the Gogs origin, resulting in a click-based Stored Cross-Site Scripting (XSS) attack.

Impact Analysis

This vulnerability can lead to arbitrary JavaScript execution in the context of the Gogs application. An attacker can exploit this by crafting malicious .ipynb files that, when viewed and interacted with by a victim, execute harmful scripts. This can result in unauthorized actions, data theft, session hijacking, or other malicious activities within the affected Gogs instance.

Mitigation Strategies

To mitigate this vulnerability, you should upgrade Gogs to version 0.14.3 or later, where the issue has been fixed.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-52798. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart