/

CVE-2026-45738

Severity:

HIGH RISK

(7.3)

Stored XSS (CWE-79) in Argo CD application links

CVE-2026-45738

Analyzed

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Session compromise and UI-driven privilege escalation

Severity:

HIGH RISK

(7.3)

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

Argo CD contains a stored cross-site scripting vulnerability where specially crafted link.argocd.argoproj.io/* annotations are rendered into the UI as clickable URLs without validation.

An attacker with application write access can inject javascript: URLs that execute in the context of a higher-privileged user's authenticated Argo CD session when they view the Summary tab.

Affected context

The issue arises in Argo CD's web UI, specifically in the Application Summary tab where link.argocd.argoproj.io/* annotations are displayed as anchor elements.

It affects environments where:

  • Users with application write access can control or update annotations on applications, and
  • Higher-privileged users (such as admins or operators) routinely view those applications via the Argo CD web interface.

The vulnerability manifests when the UI renders pipe-separated annotation values directly into href attributes without enforcing URL schemes or sanitizing potentially dangerous protocols like javascript:.

Exploit preconditions

  • Attack surface: Argo CD web UI, particularly the Application Summary tab displaying link.argocd.argoproj.io/* annotations.
  • Required access: Ability to create or modify Argo CD applications with write access, including setting custom annotations on those applications.
  • Trigger point: A higher-privileged user (or any target user) navigates to the affected application's Summary tab in the Argo CD UI, causing the malicious link to render and execute when clicked or auto-triggered by browser behavior.
  • Why exploitation is possible: The front-end component (application-summary.tsx) uses annotation values as anchor hrefs without validating the URL scheme or sanitizing untrusted content, enabling javascript: URLs to be executed in the context of the victim's authenticated session.

Why this happens

The vulnerability stems from improper neutralization of user-controlled data before it is placed into the DOM, matching CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting).

In this case, Argo CD's UI blindly trusts annotation values that are conceptually "metadata" but are effectively user input. These values are inserted into anchor href attributes without:

  • Enforcing a safe allowlist of URL schemes (e.g., https:, http:, mailto:), or
  • Applying robust sanitization or encoding for untrusted text.

This insecure pattern allows an attacker to inject javascript: or similarly dangerous URLs, which the browser interprets as executable script, leading to stored XSS that persists with the application configuration.

Potential impact

  • Hijacking of higher-privileged Argo CD user sessions via malicious JavaScript execution.
  • Unauthorized operations in the UI (e.g., modifying applications, changing synchronization policies) performed with the victim's privileges.
  • Theft of sensitive data visible in the UI, including configuration details or environment metadata.
  • Ability to pivot to further attacks against the Kubernetes cluster through compromised Argo CD accounts.
  • Persistent malicious links embedded in application metadata that can target multiple users over time.

General mitigation guidance

Effective mitigation focuses on treating all annotation-derived UI content as untrusted and enforcing strict handling at the presentation layer:

  • Apply a URL scheme allowlist when rendering links, ensuring only benign protocols (such as https:, http:, mailto:) are ever used in href attributes.
  • Use well-vetted, framework-compatible libraries for HTML and URL sanitization, ensuring dangerous schemes and script execution vectors are stripped or neutralized.
  • Render user-controlled values using context-aware encoding (e.g., HTML attribute encoding for href attributes) rather than interpolating raw strings into JSX/HTML.
  • Separate "display label" from "actionable URL" where possible, storing and validating URLs at the server side, and exposing only safe, canonicalized values to the UI.
  • Apply principle of least privilege to application write access so that fewer users can modify annotations that influence UI behavior.

How teams detect issues like this

Detection typically combines code-level analysis with behavioral checks in running systems:

  • Use static application security testing (SAST) to identify components where user-controlled data flows into DOM sinks (e.g., href, src, dangerouslySetInnerHTML) without passing through validation or encoding functions.
  • During code review, explicitly look for:
  • Rendering of annotation values or other metadata into anchor tags, iframes, or script-related attributes.
  • Lack of URL scheme validation before setting hrefs.
  • Define linting or type-safe wrappers around link creation in the UI codebase, enforcing that all links are constructed via helper functions that validate and sanitize inputs.
  • Employ dynamic application security testing (DAST) or automated browser-based tests that attempt to inject javascript: URLs into fields reflected as links in the UI.
  • Monitor logs and telemetry for suspicious annotations or URLs embedded in application metadata, especially those containing javascript: or unusual URI schemes.

Sources

SourceLink
github.comgithub.com/argoproj/argo-cd/commit/00f83c41dcfd879f34f8e0248c860d704b41cf0f
github.comgithub.com/argoproj/argo-cd/commit/35ea43c537d6e8948e67f347317fc4f88b325122
github.comgithub.com/argoproj/argo-cd/commit/c8df5ff7acc403adcee1256da5d87081cd52f0a6
github.comgithub.com/argoproj/argo-cd/releases/tag/v3.2.12
github.comgithub.com/argoproj/argo-cd/releases/tag/v3.3.10
github.comgithub.com/argoproj/argo-cd/releases/tag/v3.4.2
github.comgithub.com/argoproj/argo-cd/security/advisories/GHSA-h98r-wv3h-fr38

Frequently asked

questions

Yes. Any attacker who can reach the Argo CD API or UI and has application write access can create or modify an application with malicious annotations. Exploitation occurs when a victim with higher privileges views the affected application in the web UI.

The attacker must have permissions to create or update Argo CD applications, specifically the ability to set link.argocd.argoproj.io/* annotations. They do not need administrative access, but they do require at least write permissions on some application resources.

The safest pattern is to centralize link creation in a single helper that applies strict URL scheme allowlisting and context-aware encoding before building href attributes. Additionally, treat all annotations as untrusted input and sanitize or reject values that do not match expected URL formats.

Adopt a secure UI development baseline where any user-influenced data destined for the DOM is:

  • Validated against strict schemas or allowlists,
  • Sanitized using trusted libraries, and
  • Encoded appropriately for its context (HTML, attribute, URL, etc.).

Combine this with regular security reviews, automated static analysis focused on XSS sinks, and least-privilege permissions for metadata that influences UI rendering.

Find out what's already
exploitable in your codebase.