GHSA-j777-63hf-hx76

Suggest an improvement
Source
https://github.com/advisories/GHSA-j777-63hf-hx76
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/01/GHSA-j777-63hf-hx76/GHSA-j777-63hf-hx76.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-j777-63hf-hx76
Aliases
Published
2025-01-23T17:51:08Z
Modified
2025-01-28T15:42:01.433344Z
Severity
  • 7.1 (High) CVSS_V3 - CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H CVSS Calculator
Summary
Envoy Admin Interface Exposed through prometheus metrics endpoint
Details

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
Database specific
{
    "nvd_published_at": "2025-01-23T04:15:07Z",
    "cwe_ids": [
        "CWE-419"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2025-01-23T17:51:08Z"
}
References

Affected packages

Go / github.com/envoyproxy/gateway

Package

Name
github.com/envoyproxy/gateway
View open source insights on deps.dev
Purl
pkg:golang/github.com/envoyproxy/gateway

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.2.6