Miggo Logo

CVE-2022-31034: Insecure entropy in Argo CD's PKCE/Oauth2/OIDC params

8.4

CVSS Score
3.1

Basic Information

EPSS Score
0.58447%
Published
6/21/2022
Updated
7/21/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/argoproj/argo-cdgo>= 0.11.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 using math/rand (time-seeded) instead of crypto/rand for security-critical parameters. The commit diff shows replacements of RandString/RandStringCharset with crypto/rand-based implementations. These functions were used to generate OAuth2 state parameters (10 chars -> 24 chars), PKCE code_verifiers, and OIDC nonces - all requiring cryptographic randomness. The original implementation's use of letterIdxBits/letterIdxMax with math/rand.Source made outputs predictable, violating RFC 6749 (state), RFC 7636 (PKCE), and OIDC specs (nonce).

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t *ll v*rsions o* *r*o ** st*rtin* wit* v*.**.* *r* vuln*r**l* to * v*ri*ty o* *tt**ks w**n *n SSO lo*in is initi*t** *rom t** *r*o ** *LI or UI. T** vuln*r**iliti*s *r* *u* to t** us* o* insu**i*i*ntly r*n*om v*lu*s in p*r*m*t*rs in O*ut**

Reasoning

T** vuln*r**ility st*ms *rom usin* `m*t*/r*n*` (tim*-s*****) inst*** o* `*rypto/r*n*` *or s**urity-*riti**l p*r*m*t*rs. T** *ommit *i** s*ows r*pl***m*nts o* `R*n*Strin*`/`R*n*Strin****rs*t` wit* `*rypto/r*n*`-**s** impl*m*nt*tions. T**s* `*un*tions`