CVE-2024-22424

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. The Argo CD API prior to versions 2.10-rc2, 2.9.4, 2.8.8, and 2.7.15 are vulnerable to a cross-server request forgery (CSRF) attack when the attacker has the ability to write HTML to a page on the same parent domain as Argo CD. A CSRF attack works by tricking an authenticated Argo CD user into loading a web page which contains code to call Argo CD API endpoints on the victim’s behalf. For example, an attacker could send an Argo CD user a link to a page which looks harmless but in the background calls an Argo CD API endpoint to create an application running malicious code. Argo CD uses the “Lax” SameSite cookie policy to prevent CSRF attacks where the attacker controls an external domain. The malicious external website can attempt to call the Argo CD API, but the web browser will refuse to send the Argo CD auth token with the request. Many companies host Argo CD on an internal subdomain. If an attacker can place malicious code on, for example, https://test.internal.example.com/, they can still perform a CSRF attack. In this case, the “Lax” SameSite cookie does not prevent the browser from sending the auth cookie, because the destination is a parent domain of the Argo CD API. Browsers generally block such attacks by applying CORS policies to sensitive requests with sensitive content types. Specifically, browsers will send a “preflight request” for POSTs with content type “application/json” asking the destination API “are you allowed to accept requests from my domain?” If the destination API does not answer “yes,” the browser will block the request. Before the patched versions, Argo CD did not validate that requests contained the correct content type header. So an attacker could bypass the browser’s CORS check by setting the content type to something which is considered “not sensitive” such as “text/plain.” The browser wouldn’t send the preflight request, and Argo CD would happily accept the contents (which are actually still JSON) and perform the requested action (such as running malicious code). A patch for this vulnerability has been released in the following Argo CD versions: 2.10-rc2, 2.9.4, 2.8.8, and 2.7.15. The patch contains a breaking API change. The Argo CD API will no longer accept non-GET requests which do not specify application/json as their Content-Type. The accepted content types list is configurable, and it is possible (but discouraged) to disable the content type check completely. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Configurations

Configuration 1 (hide)

OR cpe:2.3:a:linuxfoundation:argo-cd:*:*:*:*:*:*:*:*
cpe:2.3:a:linuxfoundation:argo-cd:*:*:*:*:*:*:*:*
cpe:2.3:a:linuxfoundation:argo-cd:*:*:*:*:*:*:*:*
cpe:2.3:a:linuxfoundation:argo-cd:2.10.0:rc1:*:*:*:*:*:*

History

31 Jan 2024, 19:51

Type Values Removed Values Added
CVSS v2 : unknown
v3 : 9.6
v2 : unknown
v3 : 8.3

29 Jan 2024, 15:35

Type Values Removed Values Added
References () https://github.com/argoproj/argo-cd/issues/2496 - () https://github.com/argoproj/argo-cd/issues/2496 - Exploit, Issue Tracking, Third Party Advisory
References () https://github.com/argoproj/argo-cd/pull/16860 - () https://github.com/argoproj/argo-cd/pull/16860 - Patch
References () https://github.com/argoproj/argo-cd/security/advisories/GHSA-92mw-q256-5vwg - () https://github.com/argoproj/argo-cd/security/advisories/GHSA-92mw-q256-5vwg - Vendor Advisory
Summary
  • (es) Argo CD es una herramienta declarativa de entrega continua de GitOps para Kubernetes. La API de Argo CD anterior a las versiones 2.10-rc2, 2.9.4, 2.8.8 y 2.7.15 es vulnerable a un ataque de cross-server request forgery (CSRF) cuando el atacante tiene la capacidad de escribir HTML en una página del mismo dominio principal que Argo CD. Un ataque CSRF funciona engañando a un usuario autenticado de Argo CD para que cargue una página web que contiene código para llamar a los endpoints de la API de Argo CD en nombre de la víctima. Por ejemplo, un atacante podría enviar a un usuario de Argo CD un enlace a una página que parece inofensiva pero que en segundo plano llama a un endpoint de la API de Argo CD para crear una aplicación que ejecute código malicioso. Argo CD utiliza la política de cookies "Lax" de SameSite para evitar ataques CSRF en los que el atacante controla un dominio externo. El sitio web externo malicioso puede intentar llamar a la API de Argo CD, pero el navegador web se negará a enviar el token de autenticación de Argo CD con la solicitud. Muchas empresas alojan Argo CD en un subdominio interno. Si un atacante puede colocar código malicioso, por ejemplo, en https://test.internal.example.com/, aún puede realizar un ataque CSRF. En este caso, la cookie SameSite "Lax" no impide que el navegador envíe la cookie de autenticación, porque el destino es un dominio principal de la API de Argo CD. Los navegadores generalmente bloquean este tipo de ataques aplicando políticas CORS a solicitudes confidenciales con tipos de contenido confidenciales. Específicamente, los navegadores enviarán una "solicitud de verificación previa" para POST con tipo de contenido "application/json" preguntando a la API de destino "¿puede aceptar solicitudes de mi dominio?" Si la API de destino no responde "sí", el navegador bloqueará la solicitud. Antes de las versiones parcheadas, Argo CD no validaba que las solicitudes incluyeran el encabezado del tipo de contenido correcto. Por lo tanto, un atacante podría eludir la verificación CORS del navegador configurando el tipo de contenido en algo que se considere "no sensible", como "texto/plano". El navegador no enviaría la solicitud de verificación previa y Argo CD aceptaría felizmente el contenido (que en realidad sigue siendo JSON) y realizaría la acción solicitada (como ejecutar código malicioso). Se lanzó un parche para esta vulnerabilidad en las siguientes versiones de Argo CD: 2.10-rc2, 2.9.4, 2.8.8 y 2.7.15. El parche contiene un cambio importante en la API. La API de Argo CD ya no aceptará solicitudes que no sean GET y que no especifiquen application/json como tipo de contenido. La lista de tipos de contenido aceptados es configurable y es posible (pero desaconsejado) desactivar completamente la verificación del tipo de contenido. Se recomienda a los usuarios que actualicen. No se conocen workarounds para esta vulnerabilidad.
CVSS v2 : unknown
v3 : 8.3
v2 : unknown
v3 : 9.6
CPE cpe:2.3:a:linuxfoundation:argo-cd:*:*:*:*:*:*:*:*
cpe:2.3:a:linuxfoundation:argo-cd:2.10.0:rc1:*:*:*:*:*:*
First Time Linuxfoundation
Linuxfoundation argo-cd

19 Jan 2024, 01:51

Type Values Removed Values Added
New CVE

Information

Published : 2024-01-19 01:15

Updated : 2024-01-31 19:51


NVD link : CVE-2024-22424

Mitre link : CVE-2024-22424

CVE.ORG link : CVE-2024-22424


JSON object : View

Products Affected

linuxfoundation

  • argo-cd
CWE
CWE-352

Cross-Site Request Forgery (CSRF)