GHSA-6vxv-wg6j-5qwp: Gogs Cross-Site Scripting Vulnerability
HIGHGHSA-6vxv-wg6j-5qwp is a HIGH cross-site scripting vulnerability (CWE-1395: Dependency on Vulnerable Third-Party Component) affecting Gogs libraries in the Go ecosystem. The issue involves xss in .ipynb files renderer due to outdated notebookjs. Remediation is available by upgrading affected packages to version 0.14.3.
GHSA-6vxv-wg6j-5qwp at a Glance
How to Fix GHSA-6vxv-wg6j-5qwp
To remediate this vulnerability, upgrade all affected Gogs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade gogs.io/gogs to 0.14.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for gogs.io/gogs
How to Check if You Are Affected
To determine whether your application is affected by GHSA-6vxv-wg6j-5qwp, inspect your project dependencies for Gogs:
inspect dependencies for gogs.io/gogs
Analyze the terminal output to locate any version of Gogs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.14.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1395: Dependency on Vulnerable Third-Party Component, where the product has a dependency on a third-party component that contains one or more known vulnerabilities. In Gogs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-6vxv-wg6j-5qwp Affected Gogs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
gogs.io/gogs
|
Go |
< 0.14.3
|
0.14.3
|
References
Frequently Asked Questions
What is GHSA-6vxv-wg6j-5qwp?
Which Gogs versions are affected?
What version fixes GHSA-6vxv-wg6j-5qwp?
Is gogs.io/gogs affected?
What CWE is associated with GHSA-6vxv-wg6j-5qwp?
How can I check Go dependencies for GHSA-6vxv-wg6j-5qwp?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6vxv-wg6j-5qwp",
"modified" : "2026-06-19T21:42:52Z",
"published" : "2026-06-19T21:42:52Z",
"aliases" : [ ],
"summary" : "Gogs: XSS in .ipynb files renderer due to outdated notebookjs",
"details" : "### Summary\n\nGogs renders Jupyter notebook files (`.ipynb`) using [jsvine/notebookjs](https://github.com/jsvine/notebookjs), but the version is outdated, missing patches for known XSS vulnerabilities.\n\n### Details\n\nGogs uses version 0.4.2 of notebookjs to render Jupyter notebook files:\n\nhttps://github.com/gogs/gogs/blob/7297aee50d4c115836c7de8a3a233daaef87b911/templates/base/head.tmpl#L47\n\nThe latest version of [jsvine/notebookjs](https://github.com/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.\n\n### PoC\n\n1. Create a new repository\n2. Create a file inside the repository named `xss.ipynb` and give it the following content:\n\n```json\n{\"cells\": [{\"cell_type\": \"markdown\", \"metadata\": {}, \"source\": [\"<img src=x onerror=\\\"alert(origin)\\\">\"]}], \"metadata\": {}, \"nbformat\": 4, \"nbformat_minor\": 2}\n```\n\n<img width=\"1054\" height=\"208\" alt=\"image\" src=\"https://github.com/user-attachments/assets/49b7f33c-c4df-4537-99e9-b1ea74f2c6de\" />\n\n3. Save the file and view the file in Gogs. Notice that the XSS popup triggers:\n\n<img width=\"1317\" height=\"407\" alt=\"image\" src=\"https://github.com/user-attachments/assets/3b18d870-7194-41b0-92db-687e952abc07\" />\n\n### Impact\n\nAny 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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "gogs.io/gogs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.14.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/gogs/gogs/security/advisories/GHSA-6vxv-wg6j-5qwp"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gogs/gogs"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1395", "CWE-80" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-19T21:42:52Z",
"nvd_published_at" : null
}
}