Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
HIGH severity

GHSA-26gq-grmh-6xm6 gogs

HIGHFix: gogs/gogs@71a72a7

GHSA-26gq-grmh-6xm6 is a high-severity (CVSS 7.3) vulnerability in gogs.io/gogs. A fix is available for gogs.io/gogs — see the affected versions and patch details below.

Gogs vulnerable to Stored XSS via Mermaid diagrams

Also known asGO-2026-4454
Published
Feb 6, 2026
Updated
Feb 19, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Feb 19, 2026 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected
🐹gogs.io/gogs

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

Summary

Stored XSS via mermaid diagrams due to usage of vulnerable renderer library

Details

Gogs introduced support for rendering mermaid diagrams in version 0.13.0.

Currently used version of the library mermaid 11.9.0 is vulnerable to at least two XSS scenarios with publicly available payloads

Resources: https://github.com/mermaid-js/mermaid/security/advisories/GHSA-7rqq-prvp-x9jh https://github.com/mermaid-js/mermaid/security/advisories/GHSA-8gwm-58g9-j8pw

PoC

  1. Create a markdown file eg. README.md containing following malicious mermaid diagram (payload based on CVE-2025-54880)
architecture-beta
    group api(cloud)[API]
    service db "<img src=x onerror=\"alert(document.domain)\">" [Database] in api
  1. The XSS should pop whenever either repository or file is viewed

Demo

https://github.com/user-attachments/assets/98320f62-6c1c-4254-aa61-95598c725235

Impact

The attacker can potentially achieve account takeover In a worst case scenario if the victim were an instance admin this could lead to a compromise of the entire deployment

Proposed remediation steps

  1. Upgrade to a patched version of the third party library https://github.com/mermaid-js/mermaid/releases/tag/v10.9.5
  2. Consider running mermaid using sandbox level which would mitigate impact of future potential cross-site scripting issues https://mermaid.js.org/config/usage.html#securitylevel

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogogs.io/gogsall versions0.13.4go get gogs.io/gogs@v0.13.4

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for gogs.io/gogs, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update gogs.io/gogs to 0.13.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-26gq-grmh-6xm6 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-26gq-grmh-6xm6 can be triaged on real exposure rather than presence alone.

Tailored to GHSA-26gq-grmh-6xm6. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Summary Stored XSS via mermaid diagrams due to usage of vulnerable renderer library ### Details Gogs introduced support for rendering mermaid diagrams in version [0.13.0.](https://github.com/gogs/gogs/releases/tag/v0.13.0) Currently 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 Resources: https://github.com/mermaid-js/mermaid/security/advisories/GHSA-7rqq-prvp-x9jh https://github.com/mermaid-js/mermaid/security/advisories/GHSA-8gwm-58g9-j8pw
O3 Security · Impact-Aware SCA

Is GHSA-26gq-grmh-6xm6 in your dependencies?

O3 Security finds GHSA-26gq-grmh-6xm6 across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

GHSA-26gq-grmh-6xm6: gogs XSS (High 7.3) | O3 Security