/

CVE-2026-45627

Severity:

HIGH RISK

(8.2)

Cross-Site Scripting (XSS) in Arcane logo Endpoint

CVE-2026-45627

Deferred

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Account Takeover via Cross-Site Scripting

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A reflected cross-site scripting vulnerability in Arcane's unauthenticated /api/app-images/logo endpoint allows attacker-controlled data to be injected into an SVG logo response without proper escaping.

When a logged-in admin is tricked into visiting a crafted URL, attacker-supplied JavaScript runs in Arcane's origin and can leverage the victim's HttpOnly JWT cookie to fully compromise the admin account.

Affected context

This vulnerability affects Arcane deployments prior to 1.19.0 that expose the /api/app-images/logo endpoint.

It manifests when:

  • The endpoint accepts a color query parameter from the URL
  • The parameter value is inserted into an embedded logo.svg inside a <style> block using strings.ReplaceAll or equivalent direct string substitution
  • The response is sent with a Content-Type: image/svg+xml header, and the application does not set a restrictive Content Security Policy (CSP) or X-Content-Type-Options: nosniff

Under these conditions, browsers treat the SVG as active content capable of executing script in the context of the Arcane web application.

Exploit preconditions

  • Attack surface: Public, unauthenticated HTTP GET endpoint at /api/app-images/logo
  • Required access: None to reach the vulnerable endpoint; successful impact requires a victim user who is authenticated to Arcane (e.g., an admin) and who visits an attacker-supplied URL
  • Trigger point: The color query parameter is reflected into the <style> element of the SVG document without escaping, allowing the attacker to terminate CSS context and inject <script> content
  • Why exploitation is possible:
  • Direct string replacement is performed on the SVG template without HTML/CSS/JS context-aware encoding
  • The response is served as image/svg+xml, a script-capable document type in modern browsers
  • No CSP or X-Content-Type-Options headers are set to reduce or prevent script execution in the SVG

Why this happens

The underlying issue is a classic reflected cross-site scripting bug where untrusted input is inserted into an HTML/SVG response without proper escaping.

In this case, the color query parameter is injected directly into a <style> block in an SVG asset using naive string replacement.

Because the server does not apply encoding appropriate to CSS or XML/HTML contexts, an attacker can break out of the style context and inject <script> tags.

This maps to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting), as the application generates active content from user-controlled data without neutralizing meta-characters that change the document structure or introduce executable code.

Potential impact

  • Execution of attacker-controlled JavaScript in the Arcane web application's origin
  • Full compromise of an authenticated admin's session by abusing their HttpOnly JWT via authenticated API calls from injected script
  • Modification of Docker container, image, network, and volume configurations through the compromised admin account
  • Creation or deletion of containers and images, leading to service disruption or deployment of malicious workloads
  • Exfiltration or tampering with application configuration and operational metadata accessible to the admin UI

General mitigation guidance

Effective mitigation centers on strict output encoding, context-aware templating, and hardening of browser-facing responses:

  • Apply proper encoding for data inserted into HTML, SVG, and CSS contexts (e.g., escape special characters so user input cannot alter document structure).
  • Avoid building SVG or HTML responses with raw string concatenation; use templating mechanisms or libraries that perform context-sensitive escaping by default.
  • Treat all query parameters as untrusted, even for ostensibly simple presentation values like colors; validate against a strict allowlist of acceptable formats (e.g., hex color regex) before use.
  • Where practical, serve static assets (such as logos) from fixed, non-user-influenced templates and separate them from dynamic data entirely.
  • Deploy a restrictive Content Security Policy that limits script sources and, where feasible, disallows inline script execution to reduce XSS impact.
  • Add X-Content-Type-Options: nosniff when serving SVG and other content types to reduce unexpected script execution behaviors.

How teams detect issues like this

Organizations can look for similar vulnerabilities by:

  • Static analysis and linting:
  • Flagging direct string concatenation or ReplaceAll-style operations that mix untrusted input into SVG, HTML, or CSS templates.
  • Detecting endpoints that take query parameters and use them in responses without routing through an encoding layer.
  • Code review practices:
  • Reviewing any code paths that generate SVG or other XML-based image formats dynamically.
  • Verifying that user input included in <style>, <script>, or event handler attributes is validated and encoded.
  • Checking for missing security headers (Content-Security-Policy, X-Content-Type-Options, X-Frame-Options) on endpoints serving active content.
  • Dynamic testing and fuzzing:
  • Using automated scanners or penetration testing tools configured to probe SVG, HTML, and JSON endpoints for reflected XSS.
  • Manually testing query parameters for reflection inside style blocks or other executable contexts.
  • Security policy enforcement:
  • Integrating secure coding guidelines and automated checks into CI/CD pipelines that prevent merging code with unencoded user input in views.
  • Employing web application firewalls or reverse proxies that can enforce CSP and security headers uniformly.

Sources

SourceLink
github.comgithub.com/getarcaneapp/arcane/security/advisories/GHSA-q2pj-8v84-9mh5

Frequently asked

questions

Yes. The vulnerable endpoint is unauthenticated, so an attacker can construct a malicious URL remotely. To achieve meaningful impact, the attacker must convince a logged-in Arcane user—typically an admin—to navigate to that URL, at which point the injected JavaScript executes in the victim's browser.

The attacker does not need credentials or local access to send the exploit URL. However, the exploit only becomes powerful when a user who already has a valid, privileged session (for example, an admin authenticated via JWT) loads the crafted URL, allowing the script to act with that user's permissions.

The safest approach is to avoid inserting untrusted input directly into HTML, SVG, or CSS and instead:

  • Strictly validate and constrain the format of presentation parameters like colors.
  • Use server-side templating or helper APIs that automatically escape content based on context.
  • Ensure that any dynamic content in active documents is encoded so it cannot break out of its intended context or introduce executable script.

Long-term prevention involves combining coding practices and platform hardening:

  • Enforce context-aware output encoding for all untrusted data rendered to clients.
  • Establish and document patterns for safe handling of SVG and other active content types.
  • Apply security headers (CSP, X-Content-Type-Options, and others) consistently as a defense in depth.
  • Integrate static analysis, secure code review checklists, and automated tests into the development lifecycle to flag any new direct insertions of user input into markup or script contexts.
Find out what's already
exploitable in your codebase.