Miggo Logo

CVE-2022-31035:
Argo CD's external URLs for Deployments can include JavaScript

9.1

CVSS Score

Basic Information

EPSS Score
-
Published
6/21/2022
Updated
8/7/2024
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/argoproj/argo-cdgo>= 1.0.0, <= 1.8.72.1.16
github.com/argoproj/argo-cd/v2go< 2.1.162.1.16
github.com/argoproj/argo-cd/v2go>= 2.2.0, < 2.2.102.2.10
github.com/argoproj/argo-cd/v2go>= 2.3.0, < 2.3.52.3.5
github.com/argoproj/argo-cd/v2go= 2.4.02.4.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper URL validation when creating external links. The pre-patch version of the ExternalLink class in application-urls.tsx did not validate URL protocols, allowing malicious 'javascript:' links. The commit introduced protocol validation (isValidURL) and error handling, confirming that the absence of these checks in the constructor was the vulnerability source. The added test cases explicitly verify rejection of 'javascript:' URLs, demonstrating the previous lack of validation.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t *ll unp*t**** v*rsions o* *r*o ** st*rtin* wit* v*.*.* *r* vuln*r**l* to * *ross-sit* s*riptin* (XSS) *u* *llowin* * m*li*ious us*r to inj**t * `j*v*s*ript:` link in t** UI. W**n *li*k** *y * vi*tim us*r, t** s*ript will *x**ut* wit* t**

Reasoning

T** vuln*r**ility st*ms *rom improp*r URL v*li**tion w**n *r**tin* *xt*rn*l links. T** pr*-p*t** v*rsion o* t** *xt*rn*lLink *l*ss in *ppli**tion-urls.tsx *i* not v*li**t* URL proto*ols, *llowin* m*li*ious 'j*v*s*ript:' links. T** *ommit intro*u*** p