GHSA-26gq-grmh-6xm6: Gogs.io/gogs Cross-Site Scripting Vulnerability
HIGHGHSA-26gq-grmh-6xm6 is a HIGH (CVSS 7.3) cross-site scripting vulnerability (CWE-1395: Dependency on Vulnerable Third-Party Component) affecting Gogs.io/gogs libraries in the Go ecosystem. The issue involves gogs vulnerable to stored xss via mermaid diagrams. Remediation is available by upgrading affected packages to version 0.13.4.
GHSA-26gq-grmh-6xm6 at a Glance
Security Impact
CVSS: 7.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N).
How to Fix GHSA-26gq-grmh-6xm6
To remediate this vulnerability, upgrade all affected Gogs.io/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.13.4
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-26gq-grmh-6xm6, inspect your project dependencies for Gogs.io/gogs:
inspect dependencies for gogs.io/gogs
Analyze the terminal output to locate any version of Gogs.io/gogs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.13.4), 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.io/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-26gq-grmh-6xm6 Affected Gogs.io/gogs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
gogs.io/gogs
|
Go |
< 0.13.4
|
0.13.4
|
References
Frequently Asked Questions
What is GHSA-26gq-grmh-6xm6?
Which Gogs.io/gogs versions are affected?
What version fixes GHSA-26gq-grmh-6xm6?
Is gogs.io/gogs affected?
What is the CVSS score of GHSA-26gq-grmh-6xm6?
What CWE is associated with GHSA-26gq-grmh-6xm6?
How can I check Go dependencies for GHSA-26gq-grmh-6xm6?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-26gq-grmh-6xm6",
"modified" : "2026-02-06T19:44:14Z",
"published" : "2026-02-06T19:44:14Z",
"aliases" : [ ],
"summary" : "Gogs vulnerable to Stored XSS via Mermaid diagrams",
"details" : "### Summary\nStored XSS via mermaid diagrams due to usage of vulnerable renderer library\n\n### Details\nGogs introduced support for rendering mermaid diagrams in version [0.13.0.](https://github.com/gogs/gogs/releases/tag/v0.13.0)\n\nCurrently used version of the library [mermaid 11.9.0](https://github.com/gogs/gogs/tree/main/public/plugins/mermaid-11.9.0) is vulnerable to at least two XSS scenarios with publicly available payloads\n\nResources:\nhttps://github.com/mermaid-js/mermaid/security/advisories/GHSA-7rqq-prvp-x9jh\nhttps://github.com/mermaid-js/mermaid/security/advisories/GHSA-8gwm-58g9-j8pw\n\n### PoC\n\n1. Create a markdown file eg. `README.md` containing following malicious mermaid diagram (payload based on [CVE-2025-54880](https://github.com/mermaid-js/mermaid/security/advisories/GHSA-8gwm-58g9-j8pw))\n```\narchitecture-beta\n group api(cloud)[API]\n service db \"<img src=x onerror=\\\"alert(document.domain)\\\">\" [Database] in api\n```\n2. The XSS should pop whenever either repository or file is viewed\n\n#### Demo\n\nhttps://github.com/user-attachments/assets/98320f62-6c1c-4254-aa61-95598c725235\n\n### Impact\nThe attacker can potentially achieve account takeover\nIn a worst case scenario if the victim were an instance admin this could lead to a compromise of the entire deployment\n\n### Proposed remediation steps\n1. Upgrade to a patched version of the third party library\nhttps://github.com/mermaid-js/mermaid/releases/tag/v10.9.5\n2. Consider running mermaid using `sandbox` level which would mitigate impact of future potential cross-site scripting issues\nhttps://mermaid.js.org/config/usage.html#securitylevel",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "gogs.io/gogs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.13.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.13.3"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/gogs/gogs/security/advisories/GHSA-26gq-grmh-6xm6"
}, {
"type" : "WEB",
"url" : "https://github.com/mermaid-js/mermaid/security/advisories/GHSA-7rqq-prvp-x9jh"
}, {
"type" : "WEB",
"url" : "https://github.com/mermaid-js/mermaid/security/advisories/GHSA-8gwm-58g9-j8pw"
}, {
"type" : "WEB",
"url" : "https://github.com/gogs/gogs/commit/71a72a72ad1c8cea7940c9d7e4cbdfbc0fc3d401"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gogs/gogs"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1395", "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-06T19:44:14Z",
"nvd_published_at" : null
}
}