Skip to content

Reflected XSS in Gotify's /docs via import of outdated Swagger UI

Moderate severity GitHub Reviewed Published Jan 10, 2023 in gotify/server • Updated Feb 24, 2023

Package

gomod github.com/gotify/server (Go)

Affected versions

<= 2.2.2

Patched versions

2.2.3

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

gotify/server#541

References

@jmattheis jmattheis published to gotify/server Jan 10, 2023
Published to the GitHub Advisory Database Jan 10, 2023
Reviewed Jan 10, 2023
Last updated Feb 24, 2023

Severity

Moderate

Weaknesses

CVE ID

No known CVE

GHSA ID

GHSA-3244-8mff-w398

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.