CVE-2022-46181
Gotify server XSS vulnerability in the application image file upload
Also known as GHSA-xv6x-456v-24xh, GO-2022-1208
Mitigation
- Upgrade github.com/gotify/server to 2.2.2 or later.
- Upgrade github.com/gotify/server/v2 to 2.2.2 or later.
Who should check
- Projects that depend on Go package github.com/gotify/server (< 2.2.2)
- Projects that depend on Go package github.com/gotify/server/v2 (< 2.2.2)
- Anyone running gotify server < 2.2.2
Vulnerability facts
- Affected
- github.com/gotify/server < 2.2.2; github.com/gotify/server/v2 < 2.2.2
- Fixed in
- 2.2.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 6.1 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: Required
- Scope: Changed (impact reaches other components)
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: None
- EPSS
- 0.69% chance of exploitation in 30 days (percentile 48, 2026-11-26)
- CWE
- CWE-79
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/gotify/server | < 2.2.2 | 2.2.2 | osv |
| Go github.com/gotify/server/v2 | < 2.2.2 | 2.2.2 | osv |
| gotify server | < 2.2.2 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2022-46181. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2022-46181.md Affected: github.com/gotify/server < 2.2.2; github.com/gotify/server/v2 < 2.2.2 Fixed in: 2.2.2 Steps: 1. Search this machine and project for github.com/gotify/server (Go), github.com/gotify/server/v2 (Go), gotify server: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2022-46181 being exploited?
There is no confirmed exploitation: CVE-2022-46181 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.69% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2022-46181?
Medium: CVSS 6.1 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2022-46181?
github.com/gotify/server < 2.2.2; github.com/gotify/server/v2 < 2.2.2.
Is there a fix for CVE-2022-46181?
Yes. Fixed in 2.2.2. Upgrade github.com/gotify/server to 2.2.2 or later. Upgrade github.com/gotify/server/v2 to 2.2.2 or later.
How do I check if I'm affected by CVE-2022-46181?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.