Miggo Logo

CVE-2022-31036: Symlink following allows leaking out-of-bounds YAML files from Argo CD repo-server

4.3

CVSS Score
3.1

Basic Information

EPSS Score
0.4801%
Published
6/21/2022
Updated
1/27/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/argoproj/argo-cdgo>= 1.3.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 symlink resolution in Helm file handling. Key indicators:

  1. populateHelmAppDetails originally used filepath.Join() without validation (patched with pathutil.ResolveFilePath)
  2. loadFileIntoIfExists accepted raw paths instead of validated ResolvedFilePath type
  3. GetParameters loaded values.yaml without repository boundary checks All three functions lacked proper path validation against symlink attacks, allowing malicious users to read arbitrary YAML files through crafted symlinks in Helm applications.

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 * symlink *ollowin* *u* *llowin* * m*li*ious us*r wit* r*pository writ* ****ss to l**k s*nsitiv* Y*ML *il*s *rom *r*o **'s r*po-s*rv*r. * m*li*ious *r*o ** us*r wit

Reasoning

T** vuln*r**ility st*ms *rom improp*r symlink r*solution in **lm *il* **n*lin*. K*y in*i**tors: *. popul*t***lm*pp**t*ils ori*in*lly us** *il*p*t*.Join() wit*out v*li**tion (p*t**** wit* p*t*util.R*solv**il*P*t*) *. lo***il*IntoI**xists ****pt** r*w