GHSA-3244-8MFF-W398
Vulnerability from github – Published: 2023-01-10 22:48 – Updated: 2023-01-10 22:48Impact
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
https://github.com/gotify/server/pull/541
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 2.2.2"
},
"package": {
"ecosystem": "Go",
"name": "github.com/gotify/server"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.2.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2023-01-10T22:48:43Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "### 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\u0027t 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",
"id": "GHSA-3244-8mff-w398",
"modified": "2023-01-10T22:48:43Z",
"published": "2023-01-10T22:48:43Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/gotify/server/security/advisories/GHSA-3244-8mff-w398"
},
{
"type": "WEB",
"url": "https://github.com/gotify/server/pull/541"
},
{
"type": "PACKAGE",
"url": "https://github.com/gotify/server"
},
{
"type": "WEB",
"url": "https://research.securitum.com/mutation-xss-via-mathml-mutation-dompurify-2-0-17-bypass"
},
{
"type": "WEB",
"url": "https://www.vidocsecurity.com/blog/hacking-swagger-ui-from-xss-to-account-takeovers"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Reflected XSS in Gotify\u0027s /docs via import of outdated Swagger UI"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.