{"id":"CVE-2026-45627","aliases":["CVE-2026-45627","GHSA-q2pj-8v84-9mh5","GO-2026-5561"],"related":[],"kind":"vulnerability","state":"published","title":"Arcane: Unauthenticated reflected XSS via SVG color parameter in /api/app-images/logo enables admin account takeover","summary":"Arcane is an interface for managing Docker containers, images, networks, and volumes. Prior to 1.19.0, 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. This vulnerability is fixed in 1.19.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Arcane is an interface for managing Docker containers, images, networks, and volumes. Prior to 1.19.0, 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. This vulnerability is fixed in 1.19.0.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nThe 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.\n\n## Details\n\nThe route is registered in `backend/internal/huma/handlers/appimages.go:53-61` with an explicitly empty security requirement, marking it as public:\n\n```go\nhuma.Register(api, huma.Operation{\n    OperationID: \"get-logo\",\n    Method:      http.MethodGet,\n    Path:        \"/app-images/logo\",\n    ...\n    Security:    []map[string][]string{}, // explicit: no auth\n}, h.GetLogo)\n```\n\n`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.\n\n`GetLogoInput.Color` (`appimages.go:23`) is declared with no validation tags:\n\n```go\ntype GetLogoInput struct {\n    Full  bool   `query:\"full\" default:\"false\" ...`\n    Color string `query:\"color\" doc:\"Optional accent color override ...\"`\n}\n```\n\nThe handler passes the value straight through `getImageWithColor` → `ApplicationImagesService.GetImageWithColor` → `applyAccentColorToSVG` (`backend/internal/services/app_images_service.go:79-105`):\n\n```go\nsvgStr = strings.ReplaceAll(svgStr, \"fill:#6D28D9\", fmt.Sprintf(\"fill:%s\", accentColor))\nsvgStr = strings.ReplaceAll(svgStr, \"fill:#6d28d9\", fmt.Sprintf(\"fill:%s\", accentColor))\n```\n\nThe bundled `backend/resources/images/logo.svg` contains:\n\n```xml\n<style id=\"style1\" type=\"text/css\">.st0{fill:#6d28d9}</style>\n```\n\nso 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.\n\nBrowsers 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.\n\n## Impact\n\n- Same-origin script execution from an unauthenticated, reachable URL — only user interaction (clicking/visiting the crafted link) is required.\n- 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:\n  - Create persistent attacker-controlled admin accounts via `POST /api/users`.\n  - Read/modify secrets stored in environments, registries, and Git repositories the admin can access.\n  - Start or exec into containers on connected Docker hosts.\n- 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.\n\nDefense-in-depth — add to all responses (and especially to `/api/app-images/*`):\n\n- `X-Content-Type-Options: nosniff`\n- `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).\n- Consider serving these images with `Content-Disposition: inline` and from a separate cookie-less origin to remove the same-origin session-riding primitive entirely.\n\nAlso enforce the same allowlist on the settings write path (`SettingsService` → `AccentColor`) so a stored XSS variant cannot be introduced via the settings API.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Arcane Backend: Unauthenticated reflected XSS via SVG color parameter enables admin account takeover in github.com/getarcaneapp/arcane/backend","format":"markdown","source":"go"},{"lang":"es","text":"Arcane es una interfaz para gestionar contenedores, imágenes, redes y volúmenes de Docker. Antes de la 1.19.0, el endpoint GET /api/app-images/logo no autenticado refleja un parámetro de consulta de color proporcionado por el usuario en el cuerpo de un documento SVG a través de strings.ReplaceAll sin escape. La sustitución aterriza dentro de un elemento [style] del logo.svg incrustado, permitiendo a un atacante cerrar el bloque de estilo e inyectar contenido [script_tag] ejecutable. Debido a que la respuesta se sirve como image/svg+xml y Arcane no establece encabezados Content-Security-Policy o X-Content-Type-Options, navegar a una víctima administradora con sesión iniciada a una URL manipulada ejecuta JavaScript controlado por el atacante en el origen de Arcane y aprovecha la cookie JWT HttpOnly de la víctima para comprometer completamente la cuenta de administrador. Esta vulnerabilidad se corrige en la 1.19.0.","source":"nvd"}],"published":"2026-05-18T14:19:26.000Z","modified":"2026-10-26T13:10:00.140Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N","score":8.2,"rating":"HIGH"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 1.19.0","status":"affected"}],"vendor":"getarcaneapp","product":"arcane","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.19.0"}],"ecosystem":"Go","package":"github.com/getarcaneapp/arcane/backend","purl":"pkg:golang/github.com/getarcaneapp/arcane/backend","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.19.0"}],"ecosystem":"Go","package":"github.com/getarcaneapp/arcane/backend","purl":"pkg:golang/github.com/getarcaneapp/arcane/backend","source":"go"}],"references":[{"url":"https://github.com/getarcaneapp/arcane/security/advisories/GHSA-q2pj-8v84-9mh5","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45627","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/getarcaneapp/arcane","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-05-29T17:28:59.748Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45627","url":"https://www.cve.org/CVERecord?id=CVE-2026-45627","licence":"CVE Terms of Use","modified":"2026-05-29T17:31:14.391Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-q2pj-8v84-9mh5","url":"https://github.com/advisories/GHSA-q2pj-8v84-9mh5","licence":"CC-BY-4.0","modified":"2026-06-25T23:11:34.823Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5561","url":"https://pkg.go.dev/vuln/GO-2026-5561","licence":"CC-BY-4.0","modified":"2026-06-25T23:01:31.016Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45627","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45627","licence":"Public domain","modified":"2026-10-26T13:10:00.140Z"}],"updatedAt":"2026-11-25T22:59:23.343Z","epss":{"score":0.00534,"percentile":0.46553,"date":"2026-12-01T12:00:22.000Z"}}