Miggo Logo

CVE-2025-23216:
Argo CD does not scrub secret values from patch errors

6.8

CVSS Score

Basic Information

EPSS Score
-
Published
1/30/2025
Updated
2/5/2025
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/argoproj/argo-cd/v2go>= 2.13.0, < 2.13.42.13.4
github.com/argoproj/argo-cd/v2go>= 2.12.0, < 2.12.102.12.10
github.com/argoproj/argo-cd/v2go< 2.11.132.11.13
github.com/argoproj/argo-cdgo<= 1.8.7

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The analysis focused on two commits that patched the vulnerability. The first commit, 6f5537bdf15ddbaa0f27a1a678632ff0743e4107 in argoproj/argo-cd, primarily updated the dependency on argoproj/gitops-engine and added an E2E test (TestMaskValuesInInvalidSecret). This test confirmed that the vulnerability manifested in diff views and error messages (app.Status.OperationState.Message).

The second commit, 7e21b91e9d0f64104c8a661f3f390c5e6d73ddca in argoproj/gitops-engine, contained the core fixes:

  1. Modifications to pkg/diff/diff.go specifically in the NormalizeSecret function. The previous logic for converting stringData to data in secrets was insufficient, potentially leading to exposure of raw stringData values in diffs if the secret was invalid. The patch revised this logic to handle stringData more robustly, including base64 encoding for strings and moving other types as-is, to prevent exposure during diff generation.
  2. Modifications to pkg/utils/kube/kube.go in the cleanKubectlOutput function. This function sanitizes error messages from kubectl. The patch added a regular expression to remove map structures (e.g., map[...]) from these error messages, as these could contain sensitive data from invalid Secret manifests when a patch or apply operation failed. The commit message explicitly mentioned that "map[] in error output exposes secret data".

Therefore, NormalizeSecret was identified as vulnerable because its previous implementation could lead to secret exposure in diffs. cleanKubectlOutput was identified because its previous implementation was insufficient in scrubbing sensitive data from error messages originating from Kubernetes operations, thus allowing exposure.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t * vuln*r**ility w*s *is*ov*r** in *r*o ** t**t *xpos** s**r*t v*lu*s in *rror m*ss***s *n* t** *i** vi*w w**n *n inv*li* Ku**rn*t*s S**r*t r*sour** w*s syn*** *rom * r*pository. T** vuln*r**ility *ssum*s t** us*r **s writ* ****ss to t**

Reasoning

T** *n*lysis *o*us** on two *ommits t**t p*t**** t** vuln*r**ility. T** *irst *ommit, `****************************************` in `*r*oproj/*r*o-**`, prim*rily up**t** t** **p*n**n*y on `*r*oproj/*itops-*n*in*` *n* ***** *n *** t*st (`T*stM*skV*lu