CVE-2026-52798
Deferred Deferred - Pending Action

Stored XSS in Gogs via Malicious Jupyter Notebook Preview

Vulnerability report for CVE-2026-52798, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-06-24

Last updated on: 2026-06-25

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-25
Generated
2026-07-15
AI Q&A
2026-06-25
EPSS Evaluated
2026-07-13
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
Compliance Impact

The vulnerability in Gogs prior to version 0.14.3 allows for click-based Stored Cross-Site Scripting (XSS) via attacker-crafted .ipynb files. This can lead to arbitrary JavaScript execution in the context of the Gogs origin when a victim clicks a malicious link.

Such a vulnerability can impact compliance with common standards and regulations like GDPR and HIPAA because it may lead to unauthorized access or manipulation of sensitive data, compromise user privacy, and violate data protection requirements. The execution of arbitrary scripts could be used to steal user credentials, session tokens, or other sensitive information, thereby undermining the confidentiality and integrity of data.

Therefore, organizations using vulnerable versions of Gogs might face increased risk of non-compliance with these regulations until the vulnerability is remediated.

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.

Detection Guidance

This vulnerability can be detected by identifying if your Gogs instance is running a vulnerable version (prior to 0.14.3) and if it allows uploading and previewing .ipynb files containing malicious javascript: links.

To detect exploitation attempts or presence of malicious .ipynb files, you can search your repositories for .ipynb files containing suspicious markdown links with javascript: schemes.

  • Use git commands or file search tools to find .ipynb files with javascript: links, for example:
  • grep -r --include="*.ipynb" "javascript:" /path/to/gogs-repositories
  • Or use git grep inside a repository:
  • git grep "javascript:" -- '*.ipynb'

Additionally, monitoring HTTP traffic for requests to the /-/api/sanitize_ipynb endpoint or suspicious client-side rendering behavior involving .nb-markdown-cell elements may help detect attempts to exploit this vulnerability.

Upgrading Gogs to version 0.14.3 or later is the recommended mitigation.

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