{"answers":{"affected":"4 open source packages ship an affected version, including github.com/gotify/server and github.com/gotify/server/v2.","exploited":"There is no known exploitation of GHSA-3244-8mff-w398 in the wild and no public exploit code.","fix":"Upgrade github.com/gotify/server to 2.2.3 or later.","what":"GHSA-3244-8mff-w398 is a cross-site scripting vulnerability in github.com/gotify/server, published on 10 Jan 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-3244-8mff-w398 and fix it if it is affected.\n\nWhat it is: GHSA-3244-8mff-w398 is a cross-site scripting vulnerability in github.com/gotify/server, published on 10 Jan 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-3244-8mff-w398 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/gotify/server (Go): affected all versions; no fix listed\n- github.com/gotify/server (Go): affected all versions; fixed in 2.2.3\n- github.com/gotify/server (Go): affected all versions; fixed in 2.2.3\n- github.com/gotify/server/v2 (Go): affected all versions; fixed in 2.2.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-3244-8mff-w398/ (Markdown: https://insights.sbomify.com/GHSA-3244-8mff-w398/index.md)","id":"GHSA-3244-8mff-w398","markdown":"https://insights.sbomify.com/GHSA-3244-8mff-w398/index.md","name":"GHSA-3244-8mff-w398","record":{"aliases":["GO-2023-1471"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["account_takeover","code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Gotify notification server","requires_auth":"none","summary":"Reflected XSS in Gotify's Swagger UI allows attackers to execute arbitrary JavaScript and potentially take over user accounts via malicious links.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### 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","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Reflected XSS in Gotify's /docs via import of outdated Swagger UI","id":"GHSA-3244-8mff-w398","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"xss","year":"2023"},"n_packages":4,"n_references":null,"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/gotify/server","purl":"pkg:golang/github.com/gotify/server","source":"GO-2023-1471"},{"ecosystem":"Go","fixed":["2.2.3"],"introduced":["0"],"last_affected":[],"package":"github.com/gotify/server","purl":null,"source":"GHSA-3244-8mff-w398"},{"ecosystem":"Go","fixed":["2.2.3"],"introduced":["0"],"last_affected":[],"package":"github.com/gotify/server","purl":"pkg:golang/github.com/gotify/server","source":"GHSA-3244-8mff-w398"},{"ecosystem":"Go","fixed":["2.2.3"],"introduced":["0"],"last_affected":[],"package":"github.com/gotify/server/v2","purl":"pkg:golang/github.com/gotify/server/v2","source":"GO-2023-1471"}],"products":null,"published":"2023-01-10","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Reflected XSS in Gotify's Swagger UI allows attackers to execute arbitrary JavaScript and potentially take over user accounts via malicious links.","url":"https://insights.sbomify.com/GHSA-3244-8mff-w398/"}