Loading...
Skip to main content

CVE-2026-45627 — Vulnerability in...

HIGH

Arcane Backend: Unauthenticated reflected XSS via SVG color parameter enables admin account takeover

Published May 18, 2026Updated June 25, 2026Source: osv

Summary

## 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 override ..."` } ``` The handler passes the value straight through `getImageWithColor` → `ApplicationImagesService.GetImageWithColor` → `applyAccentColorToSVG` (`backend/internal/services/app_images_service.go:79-105`): ```go svgStr = strings.ReplaceAll(svgStr, "fill:#6D28D9", fmt.Sprintf("fill:%s", accentColor)) svgStr = strings.ReplaceAll(svgStr, "fill:#6d28d9", fmt.Sprintf("fill:%s", accentColor)) ``` The bundled `backend/resources/images/logo.svg` contains: ```xml <style id="style1" type="text/css">.st0{fill:#6d28d9}</style> ``` so a `color` value like `red}</style><script>fetch('/api/users',...)</script><style>x{` produces a valid SVG that closes the `<style>` element and embeds a `<script>` element. The response Content-Type is `image/svg+xml` (from `pkg/utils/image/image_util.go`), and a grep of the backend confirms no `Content-Security-Policy`, `X-Content-Type-Options`, or framing headers are emitted on any route. Browsers execute scripts in SVG documents loaded as top-level navigations or via `<iframe src=…>` / `window.open(…)`. The execution context is `origin(arcane-host)`, so the victim's `__Host-token` / `token` HttpOnly JWT cookie (recognized by `extractTokenFromCookieHeaderInternal` at `auth.go:274-286`) is automatically attached to subsequent same-origin `fetch()` calls. From there the attacker can invoke any privileged API the victim possesses — most damagingly `POST /api/users` to create a new admin account, after which the attacker has standalone admin access to manage Docker containers, registries, GitOps secrets, and SSH/registry credentials stored by Arcane. ## Impact - Same-origin script execution from an unauthenticated, reachable URL — only user interaction (clicking/visiting the crafted link) is required. - Full session-riding against any authenticated user, including admins. Because Arcane manages Docker daemons, container exec, image registries, and GitOps repositories, an attacker who lands script execution as an admin victim can: - Create persistent attacker-controlled admin accounts via `POST /api/users`. - Read/modify secrets stored in environments, registries, and Git repositories the admin can access. - Start or exec into containers on connected Docker hosts. - HttpOnly cookies do not mitigate the issue — cookies are auto-attached to same-origin `fetch()`. Absence of CSP and `X-Content-Type-Options: nosniff` removes available defenses-in-depth. Defense-in-depth — add to all responses (and especially to `/api/app-images/*`): - `X-Content-Type-Options: nosniff` - `Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline'; img-src 'self' data:` on the SVG image responses (or the most permissive policy compatible with the frontend on app routes). - Consider serving these images with `Content-Disposition: inline` and from a separate cookie-less origin to remove the same-origin session-riding primitive entirely. Also enforce the same allowlist on the settings write path (`SettingsService` → `AccentColor`) so a stored XSS variant cannot be introduced via the settings API.

Advisory Timeline

  • First published May 18, 2026 (147 days ago).
  • Last revised June 25, 2026 — 38 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/getarcaneapp/arcane/backend to 1.19.0 or later
go get github.com/getarcaneapp/arcane/backend@v1.19.0

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: go (1).

PackageEcosystemAffectedFixed In
github.com/getarcaneapp/arcane/backend
go
All versions1.19.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.2 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N

Frequently Asked Questions

What is CVE-2026-45627?
Arcane Backend: Unauthenticated reflected XSS via SVG color parameter enables admin account takeover This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.2/10).
How do I check if my project is affected by CVE-2026-45627?
CVE-2026-45627 affects github.com/getarcaneapp/arcane/backend. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-45627 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.2

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-q2pj-8v84-9mh5
GO-2026-5561

Related CVEs

  • CVE-2026-45625
    CRITICAL

    Arcane Backend: Missing admin authorization on git repository endpoints allows non-admin users to exfiltrate stored Git credentials and tamper with GitOps configs

  • CVE-2026-23520
    CRITICAL

    Arcane Has a Command Injection in Arcane Updater Lifecycle Labels That Enables RCE

  • CVE-2026-107809
    HIGH

    Nginx-UI AuthRequired token cookie fallback enables CSRF against management APIs

  • CVE-2026-107813
    HIGH

    Nginx UI: Incomplete fix of CVE-2026-84315 - the api/cluster router was not - wrapped in RequireSecureSession, so those sensitive mutations run without OTP step-up

  • CVE-2026-47125
    HIGH

    Arcane: Missing admin authorization on global variables endpoint

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies