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.
Published: 2026-06-24
Score: 8.9 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability resides in the client‑side rendering of Jupyter notebook (.ipynb) files in Gogs. When a markdown cell is processed by the marked() library on the client without sanitization, links that contain dangerous schemes such as javascript: are regenerated and left in the output. A user who opens the notebook and clicks one of these links executes arbitrary JavaScript in the browser, running in the same origin as the Gogs instance. This stored Cross‑Site Scripting flaw can lead to theft of session cookies, defacement of the user interface, or the execution of benign actions on behalf of the victim.

Affected Systems

Gogs is the vendor, and the flaw is present in all public releases prior to version 0.14.3, as the commit that fixed the issue was merged into 0.14.3. Based on the description, it is inferred that any deployed Gogs instance running 0.14.2 or earlier is vulnerable. The issue applies to every operating system that runs Gogs, as the development of the vulnerability is independent of the underlying platform.

Risk and Exploitability

The CVSS score of 8.9 classifies the flaw as High severity. The EPSS metric is not available, and the vulnerability is not listed in the CISA KEV catalog, so no current evidence of widespread exploitation is reported. The likely attack vector involves an attacker embedding a malicious .ipynb file into a repository; based on the description, it is inferred that the attacker must have write access to a repository that will be viewed by a target. Once the file is stored, any user who opens it and clicks the link can trigger the payload, without requiring administrative privileges. Consequently, this SSTX vulnerability remains a significant risk for environments where users can push or modify notebooks for public or internal viewing.

Generated by OpenCVE AI on June 24, 2026 at 21:53 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Gogs to version 0.14.3 or newer, which removes client‑side rendering of markdown cells from .ipynb files.
  • After upgrading, review or delete any previously stored .ipynb files that may still contain malicious links to eliminate the stored payload.
  • Restrict write permissions for users who do not need to edit notebooks, or disable the .ipynb preview feature if it is not required in the deployment.

Generated by OpenCVE AI on June 24, 2026 at 21:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-jq8v-rmf6-65jw Gogs has Stored XSS in `.ipynb` Preview
History

Wed, 24 Jun 2026 20:30:00 +0000

Type Values Removed Values Added
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.
Title Gogs: Stored XSS in `.ipynb` Preview
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 8.9, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-24T20:14:13.965Z

Reserved: 2026-06-08T18:02:19.731Z

Link: CVE-2026-52798

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-24T22:00:04Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')