CVE-2021-23347: Github.com/argoproj/argo cd/v2 Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-qq5v-f4c3-395c
CVSS 4.7
CWE-79
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2021-23347
GHSA Identifier GHSA-qq5v-f4c3-395c
Severity MODERATE
CVSS v3.1 Base Score 4.7
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Github.com/argoproj/argo cd/v2
Package Ecosystem Go
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (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.

github.com/argoproj/argo-cd/v2 fixed: 1.7.13
Upgrade github.com/argoproj/argo-cd/v2 to 1.7.13
github.com/argoproj/argo-cd/v2 fixed: 1.8.6
Upgrade github.com/argoproj/argo-cd/v2 to 1.8.6
Verify Direct and Transitive Dependencies

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

### Impact When 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. We believe the exploitation of this vulnerability is only be possible when Argo CD is connected to a compromised/malicious SSO provider. ### Patches A patch for this vulnerability is available with the v1.8.7 and v1.7.14 releases of Argo CD. ### Workarounds * Do not use SSO with the CLI when you don't trust your SSO provider If you have any questions or comments about this advisory: * 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) * Join us on [Slack](https://argoproj.github.io/community/join-slack) in channel `#argo-cd` ### Credits The 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. The 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. We fully agree with Adam that this bug is a security vulnerability and justifies publishing a SA, to provide our community and users full transparancy.

CVE-2021-23347 Affected Github.com/argoproj/argo cd/v2 Versions

2 component(s)
Fixed Versions:
1.7.131.8.6
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?
CVE-2021-23347 is a security vulnerability in Github.com/argoproj/argo cd/v2 involving Possible XSS when using SSO with the CLI in github.com/argoproj/argo-cd/v2 under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Github.com/argoproj/argo cd/v2 versions are affected?
Affected versions include releases prior to 1.7.13, 1.8.6 across affected packages: github.com/argoproj/argo-cd/v2.
What version fixes CVE-2021-23347?
Upgrading to 1.7.13, 1.8.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/argoproj/argo-cd/v2 affected?
Yes, github.com/argoproj/argo-cd/v2 is affected in releases prior to 1.7.13, 1.8.6. Upgrade your dependency to 1.7.13, 1.8.6 or later.
What is the CVSS score of CVE-2021-23347?
CVE-2021-23347 has a CVSS v3.1 base score of 4.7 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2021-23347?
CVE-2021-23347 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check Go dependencies for CVE-2021-23347?
Run the dependency tree command: 'inspect dependencies for github.com/argoproj/argo-cd/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}