{"id":"GHSA-3244-8mff-w398","aliases":["GHSA-3244-8mff-w398","GO-2023-1471"],"related":[],"kind":"vulnerability","state":"published","title":"Reflected XSS in Gotify's /docs via import of outdated Swagger UI","summary":"### Impact\n\nGotify exposes an outdated instance of the [Swagger UI](https://swagger.io/tools/swagger-ui/) API documentation frontend at `/docs` which is susceptible to reflected XSS attacks when loading external Swagger config files.\n\nSpecifically, the DOMPurify version included with this version of Swagger UI is vulnerable to a [rendering XSS](https://www.vidocsecurity.com/blog/hacking-swagger-ui-from-xss-to-account-takeovers/) incorporating the mutation payload detailed in [CVE-2020-26870](https://research.securitum.com/mutation-xss-via-mathml-mutation-dompurify-2-0-17-bypass/) which was patched in 2021. This is further tracked in the GitHub Advisory Database as GHSA-QRMM-W75W-3WPX.\n\nAn 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.\n\n### Patches\n\nThe vulnerability has been fixed in version 2.2.3.\n\n### References\n\nhttps://github.com/gotify/server/pull/541","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"### Impact\n\nGotify exposes an outdated instance of the [Swagger UI](https://swagger.io/tools/swagger-ui/) API documentation frontend at `/docs` which is susceptible to reflected XSS attacks when loading external Swagger config files.\n\nSpecifically, the DOMPurify version included with this version of Swagger UI is vulnerable to a [rendering XSS](https://www.vidocsecurity.com/blog/hacking-swagger-ui-from-xss-to-account-takeovers/) incorporating the mutation payload detailed in [CVE-2020-26870](https://research.securitum.com/mutation-xss-via-mathml-mutation-dompurify-2-0-17-bypass/) which was patched in 2021. This is further tracked in the GitHub Advisory Database as GHSA-QRMM-W75W-3WPX.\n\nAn 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.\n\n### Patches\n\nThe vulnerability has been fixed in version 2.2.3.\n\n### References\n\nhttps://github.com/gotify/server/pull/541","format":"markdown","source":"ghsa"},{"lang":"en","text":"Reflected XSS in Gotify's /docs via import of outdated Swagger UI in github.com/gotify/server","format":"markdown","source":"go"}],"published":"2023-01-10T22:48:43.000Z","modified":"2026-03-03T04:53:13.580Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.2.3"}],"ecosystem":"Go","package":"github.com/gotify/server","purl":"pkg:golang/github.com/gotify/server","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/gotify/server","purl":"pkg:golang/github.com/gotify/server","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.2.3"}],"ecosystem":"Go","package":"github.com/gotify/server/v2","purl":"pkg:golang/github.com/gotify/server/v2","source":"go"}],"references":[{"url":"https://github.com/gotify/server/security/advisories/GHSA-3244-8mff-w398","tags":["advisory","web"],"sources":["ghsa","go"]},{"url":"https://github.com/gotify/server/pull/541","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/gotify/server","tags":["package"],"sources":["ghsa"]},{"url":"https://research.securitum.com/mutation-xss-via-mathml-mutation-dompurify-2-0-17-bypass","tags":["web"],"sources":["ghsa","go"]},{"url":"https://www.vidocsecurity.com/blog/hacking-swagger-ui-from-xss-to-account-takeovers","tags":["web"],"sources":["ghsa","go"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3244-8mff-w398","url":"https://github.com/advisories/GHSA-3244-8mff-w398","licence":"CC-BY-4.0","modified":"2024-08-20T20:59:06.646Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2023-1471","url":"https://pkg.go.dev/vuln/GO-2023-1471","licence":"CC-BY-4.0","modified":"2026-03-03T04:53:13.580Z"}],"updatedAt":"2026-11-25T22:56:23.441Z"}