CVE-2023-22736
JSON

8.6high

argo-cd Controller reconciles apps outside configured namespaces when sharding is enabled

Severity
8.6high CVSS:3.1 by GitHub_M
Exploit likelihood
0.83% (higher than 58% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-6p4m-hw2h-6gmwGO-2023-1512

Description

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. Versions starting with 2.5.0-rc1 and above, prior to 2.5.8, and version 2.6.0-rc4, are vulnerable to an authorization bypass bug which allows a malicious Argo CD user to deploy Applications outside the configured allowed namespaces. Reconciled Application namespaces are specified as a comma-delimited list of glob patterns. When sharding is enabled on the Application controller, it does not enforce that list of patterns when reconciling Applications. For example, if Application namespaces are configured to be argocd-*, the Application controller may reconcile an Application installed in a namespace called other, even though it does not start with argocd-. Reconciliation of the out-of-bounds Application is only triggered when the Application is updated, so the attacker must be able to cause an update operation on the Application resource. This bug only applies to users who have explicitly enabled the "apps-in-any-namespace" feature by setting `application.namespaces` in the argocd-cmd-params-cm ConfigMap or otherwise setting the `--application-namespaces` flags on the Application controller and API server components. The apps-in-any-namespace feature is in beta as of this Security Advisory's publish date. The bug is also limited to Argo CD instances where sharding is enabled by increasing the `replicas` count for the Application controller. Finally, the AppProjects' `sourceNamespaces` field acts as a secondary check against this exploit. To cause reconciliation of an Application in an out-of-bounds namespace, an AppProject must be available which permits Applications in the out-of-bounds namespace. A patch for this vulnerability has been released in versions 2.5.8 and 2.6.0-rc5. As a workaround, running only one replica of the Application controller will prevent exploitation of this bug. Making sure all AppProjects' sourceNamespaces are restricted within the confines of the configured Application namespaces will also prevent exploitation of this bug.

Affected

Product or packageVersionsReported by
argoproj argo-cd>= 2.5.0=rc1, < 2.5.8, = 2.6.0-rc4, < 2.6.0-rc5CVE List
github.com/argoproj/argo-cd/v2 (Go)from 2.5.0-rc1 before 2.5.8, from 2.6.0-rc4 before 2.6.0-rc5GitHub Advisory Database, Go Vulnerability Database
github.com/argoproj/argo-cd (Go)all versionsGo Vulnerability Database
argoproj argo_cdfrom 2.5.0 before 2.5.8, 2.6.0NVD

All scores

GitHub_M8.6high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
GitHub8.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
NVD8.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-862

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. Versions starting with 2.5.0-rc1 and above, prior to 2.5.8, and version 2.6.0-rc4, are vulnerable to an authorization bypass bug which allows a malicious Argo CD user to deploy Applications outside the configured allowed namespaces. Reconciled Application namespaces are specified as a comma-delimited list of glob patterns. When sharding is enabled on the Application controller, it does not enforce that list of patterns when reconciling Applications. For example, if Application namespaces are configured to be argocd-*, the Application controller may reconcile an Application installed in a namespace called other, even though it does not start with argocd-. Reconciliation of the out-of-bounds Application is only triggered when the Application is updated, so the attacker must be able to cause an update operation on the Application resource. This bug only applies to users who have explicitly enabled the "apps-in-any-namespace" feature by setting `application.namespaces` in the argocd-cmd-params-cm ConfigMap or otherwise setting the `--application-namespaces` flags on the Application controller and API server components. The apps-in-any-namespace feature is in beta as of this Security Advisory's publish date. The bug is also limited to Argo CD instances where sharding is enabled by increasing the `replicas` count for the Application controller. Finally, the AppProjects' `sourceNamespaces` field acts as a secondary check against this exploit. To cause reconciliation of an Application in an out-of-bounds namespace, an AppProject must be available which permits Applications in the out-of-bounds namespace. A patch for this vulnerability has been released in versions 2.5.8 and 2.6.0-rc5. As a workaround, running only one replica of the Application controller will prevent exploitation of this bug. Making sure all AppProjects' sourceNamespaces are restricted within the confines of the configured Application namespaces will also prevent exploitation of this bug.

GitHub Advisory Database
Impact

All Argo CD versions starting with 2.5.0-rc1 are vulnerable to an authorization bypass bug which allows a malicious Argo CD user to deploy Applications outside the configured allowed namespaces.

Description of exploit

Reconciled Application namespaces are specified as a comma-delimited list of glob patterns. When sharding is enabled on the Application controller, it does not enforce that list of patterns when reconciling Applications. For example, if Application namespaces are configured to be argocd-*, the Application controller may reconcile an Application installed in a namespace called other, even though it does not start with argocd-.

Reconciliation of the out-of-bounds Application is only triggered when the Application is updated, so the attacker must be able to cause an update operation on the Application resource.

Limitations

This bug only applies to users who have explicitly enabled the "apps-in-any-namespace" feature by setting application.namespaces in the argocd-cmd-params-cm ConfigMap or otherwise setting the --application-namespaces flags on the Application controller and API server components. The apps-in-any-namespace feature is in beta as of this Security Advisory's publish date.

The bug is also limited to Argo CD instances where sharding is enabled by increasing the replicas count for the Application controller.

Finally, the AppProjects' sourceNamespaces field acts as a secondary check against this exploit. To cause reconciliation of an Application in an out-of-bounds namespace, an AppProject must be available which permits Applications in the out-of-bounds namespace.

Patches

A patch for this vulnerability has been released in the following Argo CD versions:

  • v2.5.8
  • v2.6.0-rc5
Workarounds

Running only one replica of the Application controller will prevent exploitation of this bug.

Making sure all AppProjects' sourceNamespaces are restricted within the confines of the configured Application namespaces will also prevent exploitation of this bug.

Credits

Thanks to ChangZhuo Chen (@czchen) for finding the issue and for contributing the fix!

References
For more information
Go Vulnerability Database

Controller reconciles apps outside configured namespaces when sharding is enabled in github.com/argoproj/argo-cd

NVD (es)

Argo CD es una herramienta declarativa de entrega continua de GitOps para Kubernetes. Las versiones que comienzan con 2.5.0-rc1 y superiores, anteriores a 2.5.8 y la versión 2.6.0-rc4, son vulnerables a un error de omisión de autorización que permite a un usuario malintencionado de Argo CD implementar aplicaciones fuera de los espacios de nombres permitidos configurados. Los espacios de nombres de aplicaciones reconciliados se especifican como una lista de patrones globales delimitados por comas. Cuando la fragmentación está habilitada en el controlador de aplicaciones, no aplica esa lista de patrones al conciliar aplicaciones. Por ejemplo, si los espacios de nombres de las aplicaciones están configurados para ser argocd-*, el controlador de la aplicación puede conciliar una aplicación instalada en un espacio de nombres llamado other, aunque no comience con argocd-. La conciliación de la aplicación fuera de los límites solo se activa cuando la aplicación se actualiza, por lo que el atacante debe poder provocar una operación de actualización en el recurso de la aplicación. Este error solo se aplica a los usuarios que han habilitado explícitamente la función "aplicaciones en cualquier espacio de nombres" configurando `application.namespaces` en el ConfigMap argocd-cmd-params-cm o configurando de otro modo los indicadores `--application-namespaces` en los componentes del controlador de aplicaciones y del servidor API. La función de aplicaciones en cualquier espacio de nombres se encuentra en versión beta a partir de la fecha de publicación de este aviso de seguridad. El error también se limita a las instancias de Argo CD donde la fragmentación se habilita aumentando el recuento de "réplicas" para el controlador de la aplicación. Finalmente, el campo `sourceNamespaces` de AppProjects actúa como una verificación secundaria contra este exploit. Para provocar la conciliación de una aplicación en un espacio de nombres fuera de los límites, debe estar disponible un AppProject que permita aplicaciones en el espacio de nombres fuera de los límites. Se lanzó un parche para esta vulnerabilidad en las versiones 2.5.8 y 2.6.0-rc5. Como workaround, ejecutar solo una réplica del controlador de la aplicación evitará que se aproveche este error. Asegurarse de que todos los espacios de nombres de origen de AppProjects estén restringidos dentro de los límites de los espacios de nombres de aplicaciones configurados también evitará la explotación de este error.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-22736 changed 2025-03-10CVE Terms of Use
GitHub Advisory DatabaseGHSA-6p4m-hw2h-6gmw changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2023-1512 changed 2026-03-03CC-BY-4.0
NVDCVE-2023-22736 changed 2026-06-17Public domain