# GHSA-274v-mgcv-cm8j: Argo CD GitOps Engine does not scrub secret values from patch errors

> Attackers with repository write access can expose secret values in error messages and diff views, allowing any user with read access to view sensitive data.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 Jan 2025
- **Also known as:** GO-2025-3437

## What is GHSA-274v-mgcv-cm8j?

GHSA-274v-mgcv-cm8j is a vulnerability in github.com/argoproj/gitops-engine, published on 30 Jan 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

### Impact
A vulnerability was discovered in Argo CD that exposed secret values in error messages and the diff view when an invalid Kubernetes Secret resource was synced from a repository. 

The vulnerability assumes the user has write access to the repository and can exploit it, either intentionally or unintentionally, by committing an invalid Secret to repository and triggering a Sync. Once exploited, any user with read access to Argo CD can view the exposed secret data.

### Patches
A patch for this vulnerability is available in the following Argo CD versions:
- v2.13.4
- v2.12.10
- v2.11.13

### Workarounds
There is no workaround other than upgrading.

### Resources
Fixed with commit https://github.com/argoproj/argo-cd/commit/6f5537bdf15ddbaa0f27a1a678632ff0743e4107 & https://github.com/argoproj/gitops-engine/commit/7e21b91e9d0f64104c8a661f3f390c5e6d73ddca

## Which versions are affected by GHSA-274v-mgcv-cm8j?

5 open source packages ship an affected version, including github.com/argoproj/gitops-engine.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/argoproj/gitops-engine` | Go | All versions | 0.7.1-0.20250129155113-4c6e03c463141 |
| `github.com/argoproj/gitops-engine` | Go | All versions | 0.7.1-0.20250129155113-4c6e03c463141 |
| `github.com/argoproj/gitops-engine` | Go | From 0.7.2 | None |
| `github.com/argoproj/gitops-engine` | Go | From 0.7.2 to 0.7.3 | None |
| `github.com/argoproj/gitops-engine` | Go | From 0.7.2 to 0.7.3 | None |

## How do I fix GHSA-274v-mgcv-cm8j?

Upgrade github.com/argoproj/gitops-engine to 0.7.1-0.20250129155113-4c6e03c463141 or later.

## Is GHSA-274v-mgcv-cm8j being exploited?

There is no known exploitation of GHSA-274v-mgcv-cm8j in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-274v-mgcv-cm8j and fix it if it is affected.

What it is: GHSA-274v-mgcv-cm8j is a vulnerability in github.com/argoproj/gitops-engine, published on 30 Jan 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-274v-mgcv-cm8j in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/argoproj/gitops-engine (Go): affected all versions; fixed in 0.7.1-0.20250129155113-4c6e03c463141
- github.com/argoproj/gitops-engine (Go): affected all versions; fixed in 0.7.1-0.20250129155113-4c6e03c463141
- github.com/argoproj/gitops-engine (Go): affected from 0.7.2; no fix listed
- github.com/argoproj/gitops-engine (Go): affected from 0.7.2 up to 0.7.3; no fix listed
- github.com/argoproj/gitops-engine (Go): affected from 0.7.2 up to 0.7.3; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-274v-mgcv-cm8j/ (Markdown: https://insights.sbomify.com/GHSA-274v-mgcv-cm8j/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-274v-mgcv-cm8j

---
From sbomify Insights: https://insights.sbomify.com/GHSA-274v-mgcv-cm8j/
Summaries are generated and may contain mistakes; the official description above is the record.
