{"answers":{"affected":"3 open source packages ship an affected version, including gogs.io/gogs.","exploited":"There is no known exploitation of GHSA-26gq-grmh-6xm6 in the wild and no public exploit code.","fix":"Upgrade gogs.io/gogs to 0.13.4 or later.","what":"GHSA-26gq-grmh-6xm6 is a cross-site scripting vulnerability in gogs.io/gogs, published on 6 Feb 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-26gq-grmh-6xm6 and fix it if it is affected.\n\nWhat it is: GHSA-26gq-grmh-6xm6 is a cross-site scripting vulnerability in gogs.io/gogs, published on 6 Feb 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-26gq-grmh-6xm6 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- gogs.io/gogs (Go): affected all versions; no fix listed\n- gogs.io/gogs (Go): affected all versions; fixed in 0.13.4\n- gogs.io/gogs (Go): affected all versions; fixed in 0.13.4\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-26gq-grmh-6xm6/ (Markdown: https://insights.sbomify.com/GHSA-26gq-grmh-6xm6/index.md)","id":"GHSA-26gq-grmh-6xm6","markdown":"https://insights.sbomify.com/GHSA-26gq-grmh-6xm6/index.md","name":"GHSA-26gq-grmh-6xm6","record":{"aliases":["GO-2026-4454"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["account_takeover","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"Gogs Git server","requires_auth":"low_privilege","summary":"Attackers can inject malicious scripts via Mermaid diagrams in Markdown files, leading to account takeover or admin compromise when viewed.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### 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 \"\u003cimg src=x onerror=\\\"alert(document.domain)\\\"\u003e\" [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","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Gogs vulnerable to Stored XSS via Mermaid diagrams","id":"GHSA-26gq-grmh-6xm6","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"GO-2026-4454"},{"ecosystem":"Go","fixed":["0.13.4"],"introduced":["0"],"last_affected":[],"package":"gogs.io/gogs","purl":null,"source":"GHSA-26gq-grmh-6xm6"},{"ecosystem":"Go","fixed":["0.13.4"],"introduced":["0"],"last_affected":[],"package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"GHSA-26gq-grmh-6xm6"}],"products":null,"published":"2026-02-06","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can inject malicious scripts via Mermaid diagrams in Markdown files, leading to account takeover or admin compromise when viewed.","url":"https://insights.sbomify.com/GHSA-26gq-grmh-6xm6/"}