Loading advisory.
Loading advisory.
Gogs vulnerable to Stored XSS via Mermaid diagrams
Stored XSS via mermaid diagrams due to usage of vulnerable renderer library
Published 2026-02-06 19:44 UTC · Modified 2026-02-19 20:41 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score.
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| gogs.io/gogs | Go | < 0.13.4 all versions | 0.13.4 | go get gogs.io/gogs@v0.13.4 |
Stored XSS via mermaid diagrams due to usage of vulnerable renderer library
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
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 apiThe XSS should pop whenever either repository or file is viewed
https://github.com/user-attachments/assets/98320f62-6c1c-4254-aa61-95598c725235
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
Upgrade to a patched version of the third party library https://github.com/mermaid-js/mermaid/releases/tag/v10.9.5
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
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
No EPSS history yet. Either the CVE has no score or the scores have not been fetched.