Summary
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
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.
Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.
CVE-2022-31035 has a CVSS score of 9.0 (Critical). The vector is network-reachable, low privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.1.16, 2.2.10, 2.3.5, 2.4.1); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
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
Frequently Asked Questions
- What is CVE-2022-31035? CVE-2022-31035 is a critical-severity cross-site scripting (XSS) vulnerability in github.com/argoproj/argo-cd (go), affecting versions >= 1.0.0, <= 1.8.7. It is fixed in 2.1.16, 2.2.10, 2.3.5, 2.4.1. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
- How severe is CVE-2022-31035? CVE-2022-31035 has a CVSS score of 9.0 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which packages are affected by CVE-2022-31035?
github.com/argoproj/argo-cd(go) (versions >= 1.0.0, <= 1.8.7)github.com/argoproj/argo-cd/v2(go) (versions < 2.1.16)
- Is there a fix for CVE-2022-31035? Yes. CVE-2022-31035 is fixed in 2.1.16, 2.2.10, 2.3.5, 2.4.1. Upgrade to this version or later.
- Is CVE-2022-31035 exploitable, and should I be worried? Whether CVE-2022-31035 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2022-31035 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2022-31035?
- Upgrade
github.com/argoproj/argo-cdto 2.1.16 or later - Upgrade
github.com/argoproj/argo-cd/v2to 2.1.16 or later - Upgrade
github.com/argoproj/argo-cd/v2to 2.2.10 or later - Upgrade
github.com/argoproj/argo-cd/v2to 2.3.5 or later - Upgrade
github.com/argoproj/argo-cd/v2to 2.4.1 or later
- Upgrade