Envoy Gateway is an open source project for managing Envoy Proxy as a standalone or Kubernetes-based application gateway. A user with…
GitHub_M·CWE-419·Published 2025-01-23
Envoy Gateway is an open source project for managing Envoy Proxy as a standalone or Kubernetes-based application gateway. A user with access to the Kubernetes cluster can use a path traversal attack to execute Envoy Admin interface commands on proxies managed by any version of Envoy Gateway prior to 1.2.6. The admin interface can be used to terminate the Envoy process and extract the Envoy configuration (possibly containing confidential data). Version 1.2.6 fixes the issue. As a workaround, the `EnvoyProxy` API can be used to apply a bootstrap config patch that restricts access strictly to the prometheus stats endpoint. Find below an example of such a bootstrap patch.
Envoy Gateway is an open source project for managing Envoy Proxy as a standalone or Kubernetes-based application gateway. A user with access to the Kubernetes cluster can use a path traversal attack to execute Envoy Admin interface commands on proxies managed by any version of Envoy Gateway prior to 1.2.6. The admin interface can be used to terminate the Envoy process and extract the Envoy configuration (possibly containing confidential data). Version 1.2.6 fixes the issue. As a workaround, the `EnvoyProxy` API can be used to apply a bootstrap config patch that restricts access strictly to the prometheus stats endpoint. Find below an example of such a bootstrap patch.
Envoy Admin Interface Exposed through prometheus metrics endpoint in github.com/envoyproxy/gateway
### Impact A user with access to a Kubernetes cluster where Envoy Gateway is installed can use a path traversal attack to execute Envoy Admin interface commands on proxies managed by Envoy Gateway. The admin interface can be used to terminate the Envoy process and extract the Envoy configuration (possibly containing confidential data). For example, the following command, if run from within the Kubernetes cluster, can be used to get the configuration dump of the proxy: ``` curl --path-as-is http://<Proxy-Service-ClusterIP>:19001/stats/prometheus/../../config_dump ``` ### Patches 1.2.6 ### Workarounds The `EnvoyProxy` API can be used to apply a bootstrap config patch that restricts access strictly to the prometheus stats endpoint. Find below an example of such a bootstrap patch. ``` apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy metadata: name: custom-proxy-config namespace: default spec: bootstrap: type: JSONPatch jsonPatches: - op: "add" path: "/static_resources/listeners/0/filter_chains/0/filters/0/typed_config/normalize_path" value: true - op: "replace" path: "/static_resources/listeners/0/filter_chains/0/filters/0/typed_config/route_config/virtual_hosts/0/routes/0/match" value: path: "/stats/prometheus" headers: - name: ":method" exact_match: GET ``` ### References - Envoy Admin Interface: https://www.envoyproxy.io/docs/envoy/latest/operations/admin - Envoy Configuration Best Practices: https://www.envoyproxy.io/docs/envoy/latest/configuration/best_practices/edge
Envoy Gateway es un proyecto de código abierto para administrar Envoy Proxy como una puerta de enlace de aplicaciones independiente o basada en Kubernetes. Un usuario con acceso al clúster de Kubernetes puede usar un ataque de recorrido de ruta para ejecutar comandos de la interfaz de administración de Envoy en servidores proxy administrados por cualquier versión de Envoy Gateway anterior a la 1.2.6. La interfaz de administración se puede usar para finalizar el proceso de Envoy y extraer la configuración de Envoy (que posiblemente contenga datos confidenciales). La versión 1.2.6 soluciona el problema. Como workaround, se puede usar la API `EnvoyProxy` para aplicar un parche de configuración de arranque que restrinja el acceso estrictamente al endpoint de estadísticas de Prometheus. A continuación, encontrará un ejemplo de un parche de arranque de este tipo.
| Version | Type | Source | Base | Exp | Impact | Vector |
|---|---|---|---|---|---|---|
| 3.1 | Primary | cve.org | 7.1 | — | — | CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H |
| 3.1 | Primary | cve.org | 7.1 | — | — | CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H |
| 3.1 | Secondary | GHSA | 7.1 | — | — | CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H |
| 3.1 | Secondary | NVD | 7.1 | 2.8 | 4.2 | CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H |