GHSA-g88p-r42r-ppp9 BIT-argo-cd-2025-55191 CVE-2025-55191 GO-2025-3994
Repository Credentials Race Condition Crashes Argo CD Server
- Severity
- 6.5 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.48%
- Chance of exploitation in the next 30 days. Higher than 41.67% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
- Fix
- Available
- 2 packages have a fixed version
Description
Summary
A race condition in the repository credentials handler can cause the Argo CD server to panic and crash when concurrent operations are performed on the same repository URL.
Details
The vulnerability is located in numerous repository related handlers in the util/db/repository_secrets.go file. For example, in the secretToRepoCred function. The issue manifests as a concurrent map access panic:
concurrent map read and map write
...
goroutine 1104 [running]:
github.com/argoproj/argo-cd/v2/util/db.(*secretsRepositoryBackend).secretToRepoCred(0xc000e50ea8?, 0xc000c65540)
/go/src/github.com/argoproj/argo-cd/util/db/repository_secrets.go:404 +0x31e
The race condition occurs due to:
- Concurrent repository credential operations (create/update/delete) accessing the same map
- Kubernetes informer re-syncs happening simultaneously
- Background watchers updating the same secret data
- No mutex protection for map access
A valid API token with repositories resource permissions (create, update, or delete actions) is required to trigger the race condition.
Impact
This vulnerability causes the entire Argo CD server to crash and become unavailable. Attackers can repeatedly and continuously trigger the race condition to maintain a denial-of-service state, disrupting all GitOps operations. Default ArgoCD configuration is vulnerable.
The affected code was originally introduced in PR #6103 and released in v2.1.0.
This data race was addressed by deep-copying the Secret objects before reading/writing.
Credits
This vulnerability was found, reported and fixed by:
@thevilledev
The Argo team would like to thank him for his responsible disclosure and constructive communications during the resolve of this issue.
Affected versions
Go
| Package | Vulnerable | Fixed in |
|---|---|---|
| github.com/argoproj/argo-cd | all versions |
No fix yet |
| github.com/argoproj/argo-cd/v2 | >= 2.1.0, < 2.14.20 |
2.14.20 |
| github.com/argoproj/argo-cd/v3 | >= 3.2.0-rc1, < 3.2.0-rc2 |
3.2.0-rc2 |
| github.com/argoproj/argo-cd/v3 | >= 3.1.0-rc1, < 3.1.8 |
3.1.8 |
| github.com/argoproj/argo-cd/v3 | >= 3.0.0-rc1, < 3.0.19 |
3.0.19 |
| github.com/argoproj/argo-cd/v3 | >= 3.0.0-rc1, < 3.0.19>= 3.1.0-rc1, < 3.1.8>= 3.2.0-rc1, < 3.2.0-rc2 |
3.0.193.1.83.2.0-rc2 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
github.com/argoproj/argo-cd/v2 Go → 2.14.20
- go
go get github.com/argoproj/argo-cd/v2@v2.14.20 && go mod tidy
github.com/argoproj/argo-cd/v3 Go → 3.2.0-rc2
- go
go get github.com/argoproj/argo-cd/v3@v3.2.0-rc2 && go mod tidy
Severity breakdown
CVSS 3.1 6.5
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Weakness
CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.
How to prevent it
- Architecture and Design: In languages that support it, use synchronization primitives. Only wrap these around critical code to minimize the impact on performance.
- Architecture and Design: Use thread-safe capabilities such as the data access abstraction in Spring.
- Architecture and Design: Minimize the usage of shared resources in order to remove as much complexity as possible from the control flow and to reduce the likelihood of unexpected conditions occurring. Additionally, this will minimize the amount of synchronization necessary and may even help to reduce the likelihood of a denial of service where an attacker may be able to repeatedly trigger a critical section (CWE-400).
- Implementation: When using multithreading and operating on shared variables, only use thread-safe functions.
- Implementation: Use atomic operations on shared variables. Be wary of innocent-looking constructs such as "x++". This may appear atomic at the code layer, but it is actually non-atomic at the instruction layer, since it involves a read, followed by a computation, followed by a write.
- Implementation: Use a mutex if available, but be sure to avoid related weaknesses such as CWE-412.
- Implementation: Avoid double-checked locking (CWE-609) and other implementation errors that arise when trying to avoid the overhead of synchronization.
- Implementation: Disable interrupts or signals over critical parts of the code, but also make sure that the code does not go into a large or infinite loop.
- Implementation: Use the volatile type modifier for critical variables to avoid unexpected compiler optimization or reordering. This does not necessarily solve the synchronization problem, but it can help.
- Architecture and Design, Operation: Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-fmxq-cgp8-87wp Argo CD: AppProject destination-namespace and resource restrictions bypassed by PreDelete/PostDelete resource hooks | Critical | Also affects github.com/argoproj/argo-cd |
| GHSA-j6cw-g6p4-7hch Argo CD repo-server command injection via crafted SSH repository SOCKS5 proxy URL | High | Also affects github.com/argoproj/argo-cd |
| GHSA-h98r-wv3h-fr38 Argo CD: Stored XSS in application link annotations enables developer-to-admin privilege escalation | High | Also affects github.com/argoproj/argo-cd |
| GO-2026-5618 Argo CD: Kubernetes Secret Extraction via ArgoCD ServerSideDiff via sensitive annotations | Medium | Also affects github.com/argoproj/argo-cd |
| GO-2026-5099 ArgoCD ServerSideDiff is vulnerable to Kubernetes Secret Extraction | Critical | Also affects github.com/argoproj/argo-cd |
| GHSA-gpx4-37g2-c8pv Argo CD Unauthenticated Remote DoS via malformed Azure DevOps git.push webhook | High | Also affects github.com/argoproj/argo-cd |
| GHSA-wp4p-9pxh-cgx2 argo-cd vulnerable unauthenticated DoS via malformed Gogs webhook payload | High | Also affects github.com/argoproj/argo-cd |
| GHSA-f9gq-prrc-hrhc Unauthenticated argocd-server panic via a malicious Bitbucket-Server webhook payload | High | Also affects github.com/argoproj/argo-cd |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor