GHSA-6vxv-wg6j-5qwp Gogs: XSS in .ipynb files renderer due to outdated notebookjs

Not scored Published

An attacker with repository creation rights can inject XSS payloads into Jupyter notebooks, potentially taking over victim accounts.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is GHSA-6vxv-wg6j-5qwp?

GHSA-6vxv-wg6j-5qwp is a cross-site scripting vulnerability in gogs.io/gogs, published on 19 Jun 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

Summary

Gogs renders Jupyter notebook files (.ipynb) using jsvine/notebookjs, but the version is outdated, missing patches for known XSS vulnerabilities.

Details

Gogs uses version 0.4.2 of notebookjs to render Jupyter notebook files:

https://github.com/gogs/gogs/blob/7297aee50d4c115836c7de8a3a233daaef87b911/templates/base/head.tmpl#L47

The latest version of jsvine/notebookjs is 0.8.3, patching many XSS vulnerabilities in its releases. The proof of concept below shows an example working payload that renders HTML through Markdown.

PoC

  1. Create a new repository
  2. Create a file inside the repository named xss.ipynb and give it the following content:
{"cells": [{"cell_type": "markdown", "metadata": {}, "source": ["<img src=x onerror=\"alert(origin)\">"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 2}

<img width="1054" height="208" alt="image" src="https://github.com/user-attachments/assets/49b7f33c-c4df-4537-99e9-b1ea74f2c6de" />

  1. Save the file and view the file in Gogs. Notice that the XSS popup triggers:

<img width="1317" height="407" alt="image" src="https://github.com/user-attachments/assets/3b18d870-7194-41b0-92db-687e952abc07" />

Impact

Any user with rights to create repositories can create XSS payloads that take over the victim's account when visited. Either through their own exploration of the files or by directly linking them the vulnerable URL.

Which versions are affected by GHSA-6vxv-wg6j-5qwp?

3 open source packages ship an affected version, including gogs.io/gogs.

PackageAffectedFixed in
gogs.io/gogs GoAll versionsNone
gogs.io/gogs GoAll versions0.14.3
gogs.io/gogs GoAll versions0.14.3

How do I fix GHSA-6vxv-wg6j-5qwp?

Upgrade gogs.io/gogs to 0.14.3 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is GHSA-6vxv-wg6j-5qwp being exploited?

There is no known exploitation of GHSA-6vxv-wg6j-5qwp in the wild and no public exploit code.

Sources

Also known as GO-2026-5193.

Is GHSA-6vxv-wg6j-5qwp in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free