Arcane Backend: Unauthenticated reflected XSS via SVG color parameter enables admin account takeover
Date: 2026-05
Affected: go/github.com/getarcaneapp/arcane/backend
Attack vector: xss
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2026-45627
CWE: CWE-79
CVSS: 8.2 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N)

## Summary The unauthenticated `GET /api/app-images/logo` endpoint reflects a user-supplied `color` query parameter into the body of an SVG document via `strings.ReplaceAll` with no escaping. The substitution lands inside a `<style>` element of the embedded `logo.svg`, allowing an attacker to close the style block and inject executable `<script>` content. Because the response is served as `image/svg+xml` and Arcane sets no Content-Security-Policy or `X-Content-Type-Options` headers, navigating a logged-in admin victim to a crafted URL executes attacker-controlled JavaScript in Arcane's origin and rides the victim's HttpOnly JWT cookie to fully compromise the admin account. ## Details The route is registered in `backend/internal/huma/handlers/appimages.go:53-61` with an explicitly empty security requirement, marking it as public: ```go huma.Register(api, huma.Operation{ OperationID: "get-logo", Method: http.MethodGet, Path: "/app-images/logo", ... Security: []map[string][]string{}, // explicit: no auth }, h.GetLogo) ``` `backend/internal/huma/middleware/auth.go:209-213` honors the empty `Security` value by returning `reqs.isRequired == false` and short-circuiting with `next(ctx)`, so no JWT/API-key check runs. `GetLogoInput.Color` (`appimages.go:23`) is declared with no validation tags: ```go type GetLogoInput struct { Full bool `query:"full" default:"false" ...` Color string `query:"color" doc:"Optional accent color overrid


Mitigations:

Architectural layers (MAESTRO):