CVE-2021-23347: Github.com/argoproj/argo cd/v2 Cross-Site Scripting Vulnerability
MODERATECVE-2021-23347 is a MODERATE (CVSS 4.7) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Github.com/argoproj/argo cd/v2 libraries in the Go ecosystem. The issue involves possible xss when using sso with the cli in github.com/argoproj/argo-cd/v2. Remediation is available by upgrading affected packages to version 1.7.13, 1.8.6.
CVE-2021-23347 at a Glance
Security Impact
CVSS: 4.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2021-23347
To remediate this vulnerability, upgrade all affected Github.com/argoproj/argo cd/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/argoproj/argo-cd/v2 to 1.7.13
Upgrade github.com/argoproj/argo-cd/v2 to 1.8.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/argoproj/argo-cd/v2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-23347, inspect your project dependencies for Github.com/argoproj/argo cd/v2:
inspect dependencies for github.com/argoproj/argo-cd/v2
Analyze the terminal output to locate any version of Github.com/argoproj/argo cd/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.7.13), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Github.com/argoproj/argo cd/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-23347 Affected Github.com/argoproj/argo cd/v2 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/argoproj/argo-cd/v2
|
Go |
< 1.7.13
|
1.7.13
|
|
github.com/argoproj/argo-cd/v2
|
Go |
≥ 1.8.0
< 1.8.6
|
1.8.6
|
References
Frequently Asked Questions
What is CVE-2021-23347?
Which Github.com/argoproj/argo cd/v2 versions are affected?
What version fixes CVE-2021-23347?
Is github.com/argoproj/argo-cd/v2 affected?
What is the CVSS score of CVE-2021-23347?
What CWE is associated with CVE-2021-23347?
How can I check Go dependencies for CVE-2021-23347?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qq5v-f4c3-395c",
"modified" : "2024-08-07T19:45:51Z",
"published" : "2021-05-21T14:31:41Z",
"aliases" : [ "CVE-2021-23347" ],
"summary" : "Possible XSS when using SSO with the CLI in github.com/argoproj/argo-cd/v2",
"details" : "### Impact\n\nWhen using SSO with the Argo CD CLI, a malicious SSO provider could have sent specially crafted error message that would result in XSS on the client by means of executing arbitrary JavaScript code.\n\nWe believe the exploitation of this vulnerability is only be possible when Argo CD is connected to a compromised/malicious SSO provider.\n\n### Patches\n\nA patch for this vulnerability is available with the v1.8.7 and v1.7.14 releases of Argo CD.\n\n### Workarounds\n\n* Do not use SSO with the CLI when you don't trust your SSO provider\n\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in [the Argo CD issue tracker](https://github.com/argoproj/argo-cd/issues) or [discussions](https://github.com/argoproj/argo-cd/discussions)\n* Join us on [Slack](https://argoproj.github.io/community/join-slack) in channel `#argo-cd`\n\n### Credits\n\nThe issue was found during static code scanning with CodeQL and fixed by the Argo CD team. While we believed that a rogue SSO provider would pose a severe threat by itself, we fixed it like a regular bug.\n\nThe Argo CD team would like to thank Adam Gold of Snyk (https://snyk.io) for stepping up and classifying this correctly as a security issue and for his help in determining its severity. Also, Snyk kindly reserved and provided the CVE for this vulnerability.\n\nWe fully agree with Adam that this bug is a security vulnerability and justifies publishing a SA, to provide our community and users full transparancy.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/argoproj/argo-cd/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.7.13"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/argoproj/argo-cd/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.8.0"
}, {
"fixed" : "1.8.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/argoproj/argo-cd/security/advisories/GHSA-qq5v-f4c3-395c"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23347"
}, {
"type" : "WEB",
"url" : "https://github.com/argoproj/argo-cd/pull/5563"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMARGOPROJARGOCDCMD-1078291"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-21T14:15:41Z",
"nvd_published_at" : "2021-03-03T10:15:00Z"
}
}