{"answers":{"affected":"4 open source packages ship an affected version, including github.com/gotify/server and github.com/gotify/server/v2. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-46181 in the wild and no public exploit code.","fix":"Upgrade github.com/gotify/server to 2.2.2 or later.","what":"CVE-2022-46181 is a medium-severity cross-site scripting vulnerability in gotify server, published on 29 Dec 2022. 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 CVE-2022-46181 and fix it if it is affected.\n\nWhat it is: CVE-2022-46181 is a medium-severity cross-site scripting vulnerability in gotify server, published on 29 Dec 2022. 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 CVE-2022-46181 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.2\n- github.com/gotify/server (Go): affected all versions; fixed in 2.2.2\n- github.com/gotify/server/v2 (Go): affected all versions; fixed in 2.2.2\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/CVE-2022-46181/ (Markdown: https://insights.sbomify.com/CVE-2022-46181/index.md)","id":"CVE-2022-46181","markdown":"https://insights.sbomify.com/CVE-2022-46181/index.md","name":"CVE-2022-46181","record":{"aliases":["GHSA-xv6x-456v-24xh","GO-2022-1208"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"Gotify server","requires_auth":"none","summary":"Authenticated users can upload HTML files to execute scripts when links are opened, potentially taking over victim accounts.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"server","vendor":"gotify"}],"cvss":{"score":6.1,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"Gotify server is a simple server for sending and receiving messages in real-time per WebSocket. Versions prior to 2.2.2 contain an XSS vulnerability that allows authenticated users to upload .html files. An attacker could execute client side scripts **if** another user opened a link. The attacker could potentially take over the account of the user that clicked the link. 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. The vulnerability has been fixed in version 2.2.2. As a workaround, you can block access to non image files via a reverse proxy in the `./image` directory.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Gotify server XSS vulnerability in the application image file upload","id":"CVE-2022-46181","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"xss","year":"2022"},"n_packages":4,"n_references":3,"next":{"headline":"DO NOT USE THIS CANDIDATE NUMBER.","id":"CVE-2022-46182"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/gotify/server","purl":"pkg:golang/github.com/gotify/server","source":"GO-2022-1208"},{"ecosystem":"Go","fixed":["2.2.2"],"introduced":["0"],"last_affected":[],"package":"github.com/gotify/server","purl":null,"source":"GHSA-xv6x-456v-24xh"},{"ecosystem":"Go","fixed":["2.2.2"],"introduced":["0"],"last_affected":[],"package":"github.com/gotify/server","purl":"pkg:golang/github.com/gotify/server","source":"GHSA-xv6x-456v-24xh"},{"ecosystem":"Go","fixed":["2.2.2"],"introduced":["0"],"last_affected":[],"package":"github.com/gotify/server/v2","purl":"pkg:golang/github.com/gotify/server/v2","source":"GO-2022-1208"}],"prev":{"headline":"Arbitrary HTML injection in discourse-mermaid-theme-component","id":"CVE-2022-46180"},"products":["server"],"published":"2022-12-29","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"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"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-10","vendors":["gotify"]},"summary":"Authenticated users can upload HTML files to execute scripts when links are opened, potentially taking over victim accounts.","url":"https://insights.sbomify.com/CVE-2022-46181/"}