CVE-2022-31035 — Vulnerability in argoproj/argo-cd/v2 — CVE Details
Argo CD's external URLs for Deployments can include JavaScript
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.93%). Schedule for your next planned update.
Does your project use an affected github.com/argoproj/argo-cd/v2 version?
Paste your go.sum to check it for CVE-2022-31035 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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).
The script would be capable of doing anything which is possible in the UI or 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.4.1
- v2.3.5
- v2.2.10
- v2.1.16
Workarounds
There are no completely-safe workarounds besides upgrading.
Mitigations:
-
Avoid clicking external links presented in the UI. Here is an example of an Application node with an external link:
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.
-
Carefully limit who has permissions to edit resource manifests (this is configured in RBAC).
References
Credits
Disclosed by ADA Logics in a security audit of the Argo project sponsored by CNCF and facilitated by OSTIF. Thanks to Adam Korczynski and David Korczynski for their work on the audit.
For more information
- Open an issue in the Argo CD issue tracker or discussions
- Join us on Slack in channel #argo-cd
Advisory Timeline
- First published June 21, 2022 (1619 days ago).
- Last revised August 21, 2024 — 792 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/argoproj/argo-cd/v2@v2.1.16
go get github.com/argoproj/argo-cd/v2@v2.4.1
go get github.com/argoproj/argo-cd@v2.1.16
go get github.com/argoproj/argo-cd/v2@v2.3.5
go get github.com/argoproj/argo-cd/v2@v2.2.10
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (5)
Affects 1 ecosystem: Go (2).
| Package | Fixed In |
|---|---|
| github.com/argoproj/argo-cd/v2 Go · Affected: All versions | 2.1.16 |
| github.com/argoproj/argo-cd/v2 Go · Affected: 2.4.0 | 2.4.1 |
| github.com/argoproj/argo-cd Go · Affected: All versions | 2.1.16 |
| github.com/argoproj/argo-cd/v2 Go · Affected: All versions | 2.3.5 |
| github.com/argoproj/argo-cd/v2 Go · Affected: All versions | 2.2.10 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.0 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
References
- https://github.com/argoproj/argo-cd/security/advisories/GHSA-h4w9-6x78-8vrjWEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-31035ADVISORY
- https://github.com/argoproj/argo-cd/commit/8bc3ef690de29c68a36f473908774346a44d4038WEB
- https://argo-cd.readthedocs.io/en/stable/user-guide/external-urlWEB
- https://github.com/argoproj/argo-cdPACKAGE
Frequently Asked Questions
- What is CVE-2022-31035?
- Argo CD's external URLs for Deployments can include JavaScript. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.0/10).
- How do I check if my project is affected by CVE-2022-31035?
- CVE-2022-31035 affects github.com/argoproj/argo-cd/v2 and github.com/argoproj/argo-cd. It has a 0.9% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2022-31035 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is an above-median EPSS score — 59% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2025-47933CRITICAL
Argo CD allows cross-site scripting on repositories page
- CVE-2025-23216MEDIUM
Argo CD does not scrub secret values from patch errors
- CVE-2025-59537
argo-cd vulnerable unauthenticated DoS via malformed Gogs webhook payload in github.com/argoproj/argo-cd
- CVE-2026-42880
ArgoCD ServerSideDiff is vulnerable to Kubernetes Secret Extraction in github.com/argoproj/argo-cd
- CVE-2026-45738
Argo CD: Stored XSS in application link annotations enables developer-to-admin privilege escalation in github.com/argoproj/argo-cd
- CVE-2026-45737
Argo CD: Kubernetes Secret Extraction via ArgoCD ServerSideDiff via sensitive annotations in github.com/argoproj/argo-cd
- CVE-2026-55797
Argo CD repo-server command injection via crafted SSH repository SOCKS5 proxy URL in github.com/argoproj/argo-cd
- CVE-2026-77459
Argo CD: AppProject destination-namespace and resource restrictions bypassed by PreDelete/PostDelete resource hooks in github.com/argoproj/argo-cd