medium
Reflected XSS in Gotify's /docs via import of outdated Swagger UI
- Severity
- medium rating by GitHub
- Published
- Last changed
- Also known as
- GO-2023-1471
Description
Impact
Gotify exposes an outdated instance of the Swagger UI API documentation frontend at /docs which is susceptible to reflected XSS attacks when loading external Swagger config files.
Specifically, the DOMPurify version included with this version of Swagger UI is vulnerable to a rendering XSS incorporating the mutation payload detailed in CVE-2020-26870 which was patched in 2021. This is further tracked in the GitHub Advisory Database as GHSA-QRMM-W75W-3WPX.
An attacker can execute arbitrary JavaScript and potentially take over the account of the user that clicked the link. Keep in mind, the Gotify UI won't natively expose such a malicious link, so an attacker has to get the user to open the malicious link in a context outside of Gotify.
Patches
The vulnerability has been fixed in version 2.2.3.
References
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| github.com/gotify/server (Go) | before 2.2.3, all versions | GitHub Advisory Database, Go Vulnerability Database |
| github.com/gotify/server/v2 (Go) | before 2.2.3 | Go Vulnerability Database |
Classification
What each source says
GitHub Advisory Database
Impact
Gotify exposes an outdated instance of the Swagger UI API documentation frontend at /docs which is susceptible to reflected XSS attacks when loading external Swagger config files.
Specifically, the DOMPurify version included with this version of Swagger UI is vulnerable to a rendering XSS incorporating the mutation payload detailed in CVE-2020-26870 which was patched in 2021. This is further tracked in the GitHub Advisory Database as GHSA-QRMM-W75W-3WPX.
An attacker can execute arbitrary JavaScript and potentially take over the account of the user that clicked the link. Keep in mind, the Gotify UI won't natively expose such a malicious link, so an attacker has to get the user to open the malicious link in a context outside of Gotify.
Patches
The vulnerability has been fixed in version 2.2.3.
References
Go Vulnerability Database
Reflected XSS in Gotify's /docs via import of outdated Swagger UI in github.com/gotify/server
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-3244-8mff-w398 changed 2024-08-20 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2023-1471 changed 2026-03-03 | CC-BY-4.0 |