{"id":"GHSA-jq8v-rmf6-65jw","revision":null,"records":[{"revision":"bf61d3e206c24861a258e3a350879ca9","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-52798","aliases":[],"title":"Gogs: Stored XSS in `.ipynb` Preview","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.","state":0,"publishedAt":"2026-06-24T20:14:13.965+00:00","modifiedAt":"2026-06-25T17:15:43.282+00:00","affected":[{"ecosystem":"Vendor product","name":"gogs","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"gogs\",\n                    \"product\": \"gogs\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 0.14.3\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","score":8.9,"severity":"HIGH"}],"references":["https://github.com/gogs/gogs/security/advisories/GHSA-jq8v-rmf6-65jw","https://github.com/gogs/gogs/pull/8319","https://github.com/gogs/gogs/commit/17b168b11ca759a7550e1f4bbd68bbde14db7785","https://github.com/gogs/gogs/releases/tag/v0.14.3"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-52798","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-52798","identifiers":["CVE-2026-52798"]},"retained":false,"historicalAffected":[]},{"revision":"32563b6d4dc14ca1b94242d0736e031a","observedAt":"2026-11-23T16:30:12.197+00:00","statement":{"source":"euvd","id":"EUVD-2026-39066","aliases":["CVE-2026-52798","GHSA-jq8v-rmf6-65jw"],"title":"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()…","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","score":8.9,"severity":null}],"references":["https://github.com/gogs/gogs/security/advisories/GHSA-jq8v-rmf6-65jw","https://github.com/gogs/gogs/pull/8319","https://github.com/gogs/gogs/commit/17b168b11ca759a7550e1f4bbd68bbde14db7785","https://github.com/gogs/gogs/releases/tag/v0.14.3"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-39066","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jun 24, 2026, 8:14:13 PM","dateUpdated":"Jun 25, 2026, 5:15:43 PM"},"relatedAdvisories":[{"id":"WID-SEC-W-2026-2013","title":"Gogs: Mehrere Schwachstellen","vulnerabilityIds":["CVE-2022-1285","CVE-2024-39930","CVE-2024-39932","CVE-2024-39933","CVE-2025-64719","CVE-2026-25119","CVE-2026-26194","CVE-2026-47267","CVE-2026-52795","CVE-2026-52796","CVE-2026-52798","CVE-2026-52799","CVE-2026-52800","CVE-2026-52801","CVE-2026-52802","CVE-2026-52804","CVE-2026-52805","CVE-2026-52806","CVE-2026-52807","CVE-2026-52808","CVE-2026-52809","CVE-2026-52810","CVE-2026-52811","CVE-2026-52812","CVE-2026-52813","CVE-2026-52814","CVE-2026-52815","CVE-2026-52816"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-39066","identifiers":["EUVD-2026-39066","CVE-2026-52798","GHSA-jq8v-rmf6-65jw"]},"retained":false,"historicalAffected":[]},{"revision":"693a0f6ea49646d58c14717489dd469e","observedAt":"2026-10-25T13:17:10.707+00:00","statement":{"source":"nvd","id":"CVE-2026-52798","aliases":[],"title":"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()…","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.","state":0,"publishedAt":"2026-06-24T21:16:55.533+00:00","modifiedAt":"2026-06-25T18:16:39.817+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","score":8.9,"severity":"HIGH"}],"references":["https://github.com/gogs/gogs/commit/17b168b11ca759a7550e1f4bbd68bbde14db7785","https://github.com/gogs/gogs/pull/8319","https://github.com/gogs/gogs/releases/tag/v0.14.3","https://github.com/gogs/gogs/security/advisories/GHSA-jq8v-rmf6-65jw"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-52798","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-79"],"productCriteria":[],"sourceDates":{"published":"2026-06-24T21:16:55.533","lastModified":"2026-06-25T18:16:39.817"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-52798","identifiers":["CVE-2026-52798"]},"retained":false,"historicalAffected":[]},{"revision":"705ab53204ce4c3284f8f02f050a79f2","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-jq8v-rmf6-65jw","aliases":["CVE-2026-52798","GO-2026-5477"],"title":"Gogs has Stored XSS in `.ipynb` Preview","description":"# Summary\n\nAlthough `.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.\n\nAs 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.\n\n# Details\n\nAfter the rendered output of a `.ipynb` file is sanitized via `/-/api/sanitize_ipynb` and inserted into the DOM, **only the Markdown cell portions are re-rendered using `marked()` and overwritten in the DOM**. During this process, links with the `javascript:` scheme can be regenerated.\n\n`templates/repo/view_file.tmpl:42–71`\n\n```html\n{{else if .IsIPythonNotebook}}\n  <script>\n    $.getJSON(\"{{.RawFileLink}}\", null, function(notebook_json) {\n      var notebook = nb.parse(notebook_json);\n      var rendered = notebook.render();\n      $.ajax({\n        type: \"POST\",\n        url: '{{AppSubURL}}/-/api/sanitize_ipynb',\n        data: rendered.outerHTML,\n        processData: false,\n        contentType: false,\n      }).done(function(data) {\n        $(\"#ipython-notebook\").append(data);\n        $(\"#ipython-notebook code\").each(function(i, block) {\n          $(block).addClass(\"py\").addClass(\"python\");\n          hljs.highlightBlock(block);\n        });\n\n        // Overwrite image method to append proper prefix to the source URL\n        var renderer = new marked.Renderer();\n        var context = '{{.RawFileLink}}';\n        context = context.substring(0, context.lastIndexOf(\"/\"));\n        renderer.image = function (href, title, text) {\n          return `<img src=\"${context}/${href}\"`\n        };\n        $(\"#ipython-notebook .nb-markdown-cell\").each(function(i, markdown) {\n          $(markdown).html(marked($(markdown).html(), {renderer: renderer}));\n        });\n      });\n    });\n  </script>\n```\n\nWhile **regular HTML pages (including `.ipynb` preview pages)** are served **without a Content Security Policy (CSP)**, CSP headers are applied **only to attachment delivery routes**.\n\n`internal/cmd/web.go:323`\n\n```go\nc.Header().Set(\"Content-Security-Policy\", \"default-src 'none'; style-src 'unsafe-inline'; sandbox\")\n```\n\n\n# Steps to Reproduce\n\n1. As the attacker, add and push/commit a `.ipynb` file containing a `javascript:` link in a Markdown cell to a repository.\n\n   * Example (PoC):\n\n     ```json\n     {\n       \"nbformat\": 4,\n       \"nbformat_minor\": 2,\n       \"metadata\": {},\n       \"cells\": [\n         {\n           \"cell_type\": \"markdown\",\n           \"metadata\": {},\n           \"source\": [\n             \"[poc](javascript:alert(document.domain))\"\n           ]\n         }\n       ]\n     }\n     ```\n\n2. The victim opens the file on Gogs (e.g., `/<user>/<repo>/src/<branch>/poc.ipynb`).\n<img width=\"2386\" height=\"1218\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b0d93fd8-c5ca-4058-8af0-98dee590d3ad\" />\n\n3. When the victim clicks the `poc` link displayed in the preview, `alert(document.domain)` is executed in the same Gogs origin.\n<img width=\"2390\" height=\"1388\" alt=\"image\" src=\"https://github.com/user-attachments/assets/0eb6ebe8-632c-4a41-8a11-46471514b4c4\" />\n\n# Minimum Required Privileges\n\n* **Attacker**: Ability to place a `.ipynb` file as a **regular (non-admin) user**\n\n  * For example: a general user who can create a public repository and add files.\n  * Or: write access (collaborator, etc.) to an existing repository that the victim will view.\n* **Victim**: Permission to view the repository (a click is required).\n\n# Impact\n\n* Unauthorized actions performed with the victim’s account privileges (e.g., repository settings changes, Issue operations,誘導 to token creation).\n* Theft of information accessible to the victim (repository/Issue/Wiki contents, tokens exposed in page context).\n* If the victim is an administrator, the impact may escalate to instance-wide configuration changes and user management.","state":0,"publishedAt":"2026-06-22T23:58:46+00:00","modifiedAt":"2026-07-21T13:30:31.8034385+00:00","affected":[{"ecosystem":"Go","name":"gogs.io/gogs","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.14.3"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/gogs/gogs/security/advisories/GHSA-jq8v-rmf6-65jw","https://nvd.nist.gov/vuln/detail/CVE-2026-52798","https://github.com/gogs/gogs/pull/8319","https://github.com/gogs/gogs/commit/17b168b11ca759a7550e1f4bbd68bbde14db7785","https://github.com/gogs/gogs","https://github.com/gogs/gogs/releases/tag/v0.14.3"],"sourceUrl":"https://github.com/advisories/GHSA-jq8v-rmf6-65jw","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-jq8v-rmf6-65jw","identifiers":["GHSA-jq8v-rmf6-65jw","CVE-2026-52798","GO-2026-5477"]},"retained":false,"historicalAffected":[]},{"revision":"a8926720ac564fd88a1787693a724748","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-5477","aliases":["CVE-2026-52798","GHSA-jq8v-rmf6-65jw"],"title":"Gogs has Stored XSS in `.ipynb` Preview in gogs.io/gogs","description":"Gogs has Stored XSS in `.ipynb` Preview in gogs.io/gogs.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: gogs.io/gogs before v0.14.3.","state":0,"publishedAt":"2026-06-25T22:34:31+00:00","modifiedAt":"2026-06-25T23:01:18.2467443+00:00","affected":[{"ecosystem":"Go","name":"gogs.io/gogs","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/gogs/gogs/security/advisories/GHSA-jq8v-rmf6-65jw","https://github.com/gogs/gogs/commit/17b168b11ca759a7550e1f4bbd68bbde14db7785","https://github.com/gogs/gogs/pull/8319","https://github.com/gogs/gogs/releases/tag/v0.14.3"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-5477","license":"OSV · upstream source license applies","key":"osv:GO-2026-5477","identifiers":["GO-2026-5477","CVE-2026-52798","GHSA-jq8v-rmf6-65jw"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-24T11:25:35.5405878+00:00","complete":true,"records":1792,"lastAttemptAt":"2026-11-24T11:25:35.5405878+00:00","lastSuccessAt":"2026-11-24T11:25:35.7075047+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.707505+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-f6e4a7f93ed9acd6fcb1f804a4567f7b9b16730ac126110af8d6d24176317946-6231a31653a43e57f005d532b3b61ff1da85288f32bbf39b75f07bda011db41a","complete":true,"records":431100,"lastAttemptAt":"2026-11-24T11:25:35.0471978+00:00","lastSuccessAt":"2026-11-24T11:25:34.9172836+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.0471978+00:00","snapshotPublishedAt":"2026-11-24T10:25:56+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-d7c5d9b448144635bf3c41ecc488a309","complete":false,"records":13935,"lastAttemptAt":"2026-11-24T11:35:58.3742494+00:00","lastSuccessAt":"2026-11-24T11:35:57.35+00:00","error":"535 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-24T11:35:57.35+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13258,"expectedIdentifiers":13982,"failedIdentifiers":535},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-24T11:25:35.5405878+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-24T11:25:35.5405878+00:00","lastSuccessAt":"2026-11-24T11:25:35.7082792+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.7082793+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-18a230aff64e42c7b71e8312589a3430","complete":false,"records":13947,"lastAttemptAt":"2026-11-24T11:25:55.2915098+00:00","lastSuccessAt":"2026-11-24T11:25:55.288+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:55.288+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13682,"expectedIdentifiers":13982,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c86437892ddabdeaf17409463a17578b1e71dd185d64061100dd57629858f6d6","complete":true,"records":10074,"lastAttemptAt":"2026-11-24T11:25:35.3898621+00:00","lastSuccessAt":"2026-11-23T22:27:19.6557603+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.3898621+00:00","snapshotPublishedAt":"2026-11-23T21:33:52+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-24T11:25:35.1158017+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.1158017+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-3afd4dd07a6bf352a6a53c4438150c464a2527017b95ca94804134ea15f1eba9","complete":true,"records":3220,"lastAttemptAt":"2026-11-24T11:25:35.5015915+00:00","lastSuccessAt":"2026-11-24T10:25:37.8779609+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.5015915+00:00","snapshotPublishedAt":"2026-11-24T09:33:40+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-b3f815f4b80e6ee7009a469e05600427b49c4c540d96b9bae57af39cb7a4c7df","complete":true,"records":232959,"lastAttemptAt":"2026-11-24T11:25:35.2873819+00:00","lastSuccessAt":"2026-11-24T08:27:06.9384925+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.2873819+00:00","snapshotPublishedAt":"2026-11-24T07:33:55+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}