7.5high
Argo CD Denial of Service (DoS) Vulnerability Due to Unsafe Array Modification in Multi-threaded Environment
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.18% (higher than 68% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-6v85-wr92-q4p7BIT-ARGO-CD-2024-21661GO-2024-2654
Description
Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. Prior to versions 2.8.13, 2.9.9, and 2.10.4, an attacker can exploit a critical flaw in the application to initiate a Denial of Service (DoS) attack, rendering the application inoperable and affecting all users. The issue arises from unsafe manipulation of an array in a multi-threaded environment. The vulnerability is rooted in the application's code, where an array is being modified while it is being iterated over. This is a classic programming error but becomes critically unsafe when executed in a multi-threaded environment. When two threads interact with the same array simultaneously, the application crashes. This is a Denial of Service (DoS) vulnerability. Any attacker can crash the application continuously, making it impossible for legitimate users to access the service. The issue is exacerbated because it does not require authentication, widening the pool of potential attackers. Versions 2.8.13, 2.9.9, and 2.10.4 contain a patch for this issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| argoproj argo-cd | < 2.8.13, >= 2.9.0, < 2.9.9, >= 2.10.0, < 2.10.4, before 2.8.13, from 2.9.0 before 2.9.9, from 2.10.0 before 2.10.4 | CVE List |
| github.com/argoproj/argo-cd (Go) | up to 1.8.7 | GitHub Advisory Database |
| github.com/argoproj/argo-cd/v2 (Go) | before 2.8.13, from 2.9.0 before 2.9.9, from 2.10.0 before 2.10.4 | GitHub Advisory Database, Go Vulnerability Database |
| argoproj argo_cd | before 2.8.13, from 2.9.0 before 2.9.9, from 2.10.0 before 2.10.4 | NVD |
| argo-cd (Bitnami) | before 2.10.4 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| Bitnami Vulnerability Database | high rating |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. Prior to versions 2.8.13, 2.9.9, and 2.10.4, an attacker can exploit a critical flaw in the application to initiate a Denial of Service (DoS) attack, rendering the application inoperable and affecting all users. The issue arises from unsafe manipulation of an array in a multi-threaded environment. The vulnerability is rooted in the application's code, where an array is being modified while it is being iterated over. This is a classic programming error but becomes critically unsafe when executed in a multi-threaded environment. When two threads interact with the same array simultaneously, the application crashes. This is a Denial of Service (DoS) vulnerability. Any attacker can crash the application continuously, making it impossible for legitimate users to access the service. The issue is exacerbated because it does not require authentication, widening the pool of potential attackers. Versions 2.8.13, 2.9.9, and 2.10.4 contain a patch for this issue.
GitHub Advisory Database
Summary
An attacker can exploit a critical flaw in the application to initiate a Denial of Service (DoS) attack, rendering the application inoperable and affecting all users. The issue arises from unsafe manipulation of an array in a multi-threaded environment.
Details
The vulnerability is rooted in the application's code, where an array is being modified while it is being iterated over. This is a classic programming error but becomes critically unsafe when executed in a multi-threaded environment. When two threads interact with the same array simultaneously, the application crashes.
The core issue is located in expireOldFailedAttempts function:
func expireOldFailedAttempts(maxAge time.Duration, failures *map[string]LoginAttempts) int {
expiredCount := 0
for key, attempt := range *failures {
if time.Since(attempt.LastFailed) > maxAge*time.Second { expiredCount += 1
delete(*failures, key) // Vulnerable code
} }
return expiredCount }
The function modifies the array while iterating it which means the code will cause an error and crash the application pod, inspecting the logs just before the crash we can confirm:
goroutine 2032 [running]: github.com/argoproj/argo-cd/v2/util/session.expireOldFailedAttempts(0x12c, 0xc000adecd8)
/go/src/github.com/argoproj/argo-cd/util/session/sessionmanager.go:304 +0x7c github.com/argoproj/argo-cd/v2/util/session.(*SessionManager).updateFailureCount(0xc00035 af50, {0xc001b1f578, 0x11}, 0x1)
/go/src/github.com/argoproj/argo-cd/util/session/sessionmanager.go:320 +0x7f github.com/argoproj/argo-cd/v2/util/session.(*SessionManager).VerifyUsernamePassword(0xc 00035af50, {0xc001b1f578, 0x11}, {0xc000455148, 0x8})
PoC
To reproduce the vulnerability, you can use the following steps:
- Launch the application.
- Trigger the code path that results in the
expireOldFailedAttempts()function being called in multiple threads. - In the attached PoC script we are restarting the server in a while loop, causing the application to be unresponsive at all.
Impact
This is a Denial of Service (DoS) vulnerability. Any attacker can crash the application continuously, making it impossible for legitimate users to access the service. The issue is exacerbated because it does not require authentication, widening the pool of potential attackers.
Go Vulnerability Database
Application may crash due to concurrent writes, leading to a denial of service. An attacker can crash the application continuously, making it impossible for legitimate users to access the service. Authentication is not required in the attack.
NVD (es)
Argo CD es una herramienta declarativa de entrega continua de GitOps para Kubernetes. Antes de las versiones 2.8.13, 2.9.9 y 2.10.4, un atacante podía explotar una falla crítica en la aplicación para iniciar un ataque de denegación de servicio (DoS), dejando la aplicación inoperable y afectando a todos los usuarios. El problema surge de la manipulación insegura de una matriz en un entorno de subprocesos múltiples. La vulnerabilidad tiene su origen en el código de la aplicación, donde se modifica una matriz mientras se itera sobre ella. Este es un error de programación clásico, pero se vuelve críticamente inseguro cuando se ejecuta en un entorno de subprocesos múltiples. Cuando dos subprocesos interactúan con la misma matriz simultáneamente, la aplicación falla. Esta es una vulnerabilidad de denegación de servicio (DoS). Cualquier atacante puede bloquear la aplicación continuamente, imposibilitando que los usuarios legítimos accedan al servicio. El problema se agrava porque no requiere autenticación, lo que amplía el grupo de atacantes potenciales. Las versiones 2.8.13, 2.9.9 y 2.10.4 contienen un parche para este problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-21661 changed 2024-08-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6v85-wr92-q4p7 changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2024-2654 changed 2024-05-20 | CC-BY-4.0 |
| NVD | CVE-2024-21661 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-ARGO-CD-2024-21661 changed 2026-09-08 | Apache-2.0 |