CVE-2022-31102: Github.com/argoproj/argo cd Cross-Site Scripting Vulnerability
LOWCVE-2022-31102 is a LOW (CVSS 2.6) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Github.com/argoproj/argo cd libraries in the Go ecosystem. The issue involves argo cd sso users vulnerable to cross-site scripting. Remediation is available by upgrading affected packages to version 2.3.6, 2.4.5.
CVE-2022-31102 at a Glance
Security Impact
CVSS: 2.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:N/I:L/A:N).
How to Fix CVE-2022-31102
To remediate this vulnerability, upgrade all affected Github.com/argoproj/argo cd 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 to 2.3.6
Upgrade github.com/argoproj/argo-cd to 2.4.5
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
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-31102, inspect your project dependencies for Github.com/argoproj/argo cd:
inspect dependencies for github.com/argoproj/argo-cd
Analyze the terminal output to locate any version of Github.com/argoproj/argo cd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.6), 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, 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-2022-31102 Affected Github.com/argoproj/argo cd Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/argoproj/argo-cd
|
Go |
≥ 2.3.0
< 2.3.6
|
2.3.6
|
|
github.com/argoproj/argo-cd
|
Go |
≥ 2.4.0
< 2.4.5
|
2.4.5
|
References
Frequently Asked Questions
What is CVE-2022-31102?
Which Github.com/argoproj/argo cd versions are affected?
What version fixes CVE-2022-31102?
Is github.com/argoproj/argo-cd affected?
What is the CVSS score of CVE-2022-31102?
What CWE is associated with CVE-2022-31102?
How can I check Go dependencies for CVE-2022-31102?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pmjg-52h9-72qv",
"modified" : "2022-07-21T15:54:45Z",
"published" : "2022-07-12T22:11:16Z",
"aliases" : [ "CVE-2022-31102" ],
"summary" : "Argo CD SSO users vulnerable to Cross-site Scripting",
"details" : "### Impact\n\nAll versions of Argo CD starting with 2.3.0 are vulnerable to a cross-site scripting (XSS) bug which could allow an attacker to inject arbitrary JavaScript in the `/auth/callback` page in a victim's browser. \n\nThis vulnerability only affects Argo CD instances which have SSO enabled.\n\nThe exploit also assumes the attacker has 1) access to the API server's encryption key, 2) a method to add a cookie to the victim's browser, and 3) the ability to convince the victim to visit a malicious `/auth/callback` link.\n\nThe vulnerability is classified as low severity, because access to the API server's encryption key already grants a high level of access. Exploiting the XSS would allow the attacker to impersonate the victim, but would not grant any privileges which the attacker could not otherwise gain using the encryption key.\n\n### Patches\n\nA patch for this vulnerability has been released in the following Argo CD versions:\n\n* v2.4.5\n* v2.3.6\n\n### Workarounds\n\nThere is no workaround besides upgrading.\n\n### Credits\n\nDisclosed 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.\n\n### For more information\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",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/argoproj/argo-cd"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.3.0"
}, {
"fixed" : "2.3.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/argoproj/argo-cd"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.4.0"
}, {
"fixed" : "2.4.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/argoproj/argo-cd/security/advisories/GHSA-pmjg-52h9-72qv"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-31102"
}, {
"type" : "WEB",
"url" : "https://github.com/argoproj/argo-cd/commit/3800a1e49d1d5a00a6692fee83396a37a6abe89a"
}, {
"type" : "WEB",
"url" : "https://github.com/argoproj/argo-cd/commit/8d5119b1e3038a2c1d8b651cb242525e9e734c4c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/argoproj/argo-cd"
}, {
"type" : "WEB",
"url" : "https://github.com/argoproj/argo-cd/releases/tag/v2.3.6"
}, {
"type" : "WEB",
"url" : "https://github.com/argoproj/argo-cd/releases/tag/v2.4.5"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2022-07-12T22:11:16Z",
"nvd_published_at" : "2022-07-12T22:15:00Z"
}
}