GHSA-jwv5-8mqv-g387

Suggest an improvement
Source
https://github.com/advisories/GHSA-jwv5-8mqv-g387
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/03/GHSA-jwv5-8mqv-g387/GHSA-jwv5-8mqv-g387.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-jwv5-8mqv-g387
Aliases
Related
Published
2024-03-15T19:46:21Z
Modified
2024-05-20T22:06:33Z
Severity
  • 9.0 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H CVSS Calculator
Summary
Cross-site scripting on application summary component
Details

Summary

Due to the improper URL protocols filtering of links specified in the link.argocd.argoproj.io annotations in the application summary component, an attacker can achieve cross-site scripting with elevated permissions.

Impact

All unpatched versions of Argo CD starting with v1.0.0 are vulnerable to a cross-site scripting (XSS) bug allowing a malicious user to inject a javascript: link in the UI. When clicked by a victim user, the script will execute with the victim's permissions (up to and including admin).

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.

Patches

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

  • v2.10.3
  • v2.9.8
  • v2.8.12

Workarounds

There are no completely-safe workarounds besides upgrading. The safest alternative, if upgrading is not possible, would be to create a Kubernetes admission controller to reject any resources with an annotation starting with link.argocd.argoproj.io or reject the resource if the value use an improper URL protocol. This validation will need to be applied in all clusters managed by ArgoCD.

Mitigations

  1. Avoid clicking external links presented in the UI. The link's title is user-configurable. So even if you hover the link, and the tooltip looks safe, the link might be malicious. The only way to be certain that the link is safe is to inspect the page's source.
  2. Carefully limit who has permissions to edit Kubernetes resource manifests (this is configured in RBAC for ArgoCD). The external-links are set as annotations on Kubernetes resources. Any persona with write access to resources managed by ArgoCD could be an actor.

References

Documentation for the external links feature

Credits

Disclosed by RyotaK (@Ry0taK)

For more information

Database specific
{
    "nvd_published_at": "2024-03-13T21:16:00Z",
    "cwe_ids": [
        "CWE-79"
    ],
    "severity": "CRITICAL",
    "github_reviewed": true,
    "github_reviewed_at": "2024-03-15T19:46:21Z"
}
References

Affected packages

Go / github.com/argoproj/argo-cd

Package

Name
github.com/argoproj/argo-cd
View open source insights on deps.dev
Purl
pkg:golang/github.com/argoproj/argo-cd

Affected ranges

Type
SEMVER
Events
Introduced
1.0.0
Last affected
1.8.7

Go / github.com/argoproj/argo-cd/v2

Package

Name
github.com/argoproj/argo-cd/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/argoproj/argo-cd/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.9.0
Fixed
2.9.8

Go / github.com/argoproj/argo-cd/v2

Package

Name
github.com/argoproj/argo-cd/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/argoproj/argo-cd/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.10.0
Fixed
2.10.3

Go / github.com/argoproj/argo-cd/v2

Package

Name
github.com/argoproj/argo-cd/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/argoproj/argo-cd/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.0.0
Fixed
2.8.12