Skip to content

Cross-site scripting on repositories page

Critical
crenshaw-dev published GHSA-2hj5-g64g-fp6p May 28, 2025

Package

gomod github.com/argoproj/argo-cd (Go)

Affected versions

>=1.2.0-rc1

Patched versions

3.0.4, 2.14.13, 2.13.8

Description

Impact

This vulnerability allows an attacker to perform arbitrary actions on behalf of the victim via the API, such as creating, modifying, and deleting Kubernetes resources. Due to the improper filtering of URL protocols in the repository page, an attacker can achieve cross-site scripting with permission to edit the repository.

In ui/src/app/shared/components/urls.ts, the following code exists to parse the repository URL.

export function repoUrl(url: string): string {
try {
const parsed = GitUrlParse(url);
if (!supportedSource(parsed)) {
return null;
}
return `${protocol(parsed.protocol)}://${parsed.resource}/${parsed.owner}/${parsed.name}`;
} catch {
return null;
}
}

Since this code doesn't validate the protocol of repository URLs, it's possible to inject javascript: URLs here.

const href = repoUrl(url);
const content = children || url;
return href !== null ? <a href={href}>{content}</a> : <span>{content}</span>;

As the return value of this function is used in the href attribute of the a tag, it's possible to achieve cross-site scripting by using javascript: URLs.

Browsers may return the proper hostname for javascript: URLs, allowing exploitation of this vulnerability.

Patches

A patch for this vulnerability has been released in the following Argo CD versions:

  • v3.0.4
  • v2.14.13
  • v2.13.8

The patch incorporates a way to validate the URL being passed in. Returning null if the validation fails.

Workarounds

There are no workarounds other than depending on the browser to filter the URL.

Credits

Disclosed by @Ry0taK RyotaK.

For more information

Open an issue in the Argo CD issue tracker or discussions
Join us on Slack in channel #argo-cd

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H

CVE ID

CVE-2025-47933

Credits