Envoy Gateway: Authentication Bypass via Improper Input Validation in EnvoyExtensionPolicy Lua Allows Secret Disclosure
Critical severity
GitHub Reviewed
Published
Jun 5, 2026
in
envoyproxy/gateway
•
Updated Jul 16, 2026
Package
Affected versions
>= 1.8.0-rc.0, < 1.8.1
< 1.7.4
Patched versions
1.8.1
1.7.4
Description
Published to the GitHub Advisory Database
Jul 16, 2026
Reviewed
Jul 16, 2026
Last updated
Jul 16, 2026
Impact
The
to_absolute_normalized_pathfunction (security.lua:28-43) does not collapse redundant path separators (// → /). On Linux,//etc/passwdis equivalent to/etc/passwd(POSIX path semantics), butis_critical_pathfails to match the double-slash variant because//etc/passwddoes not start with/etc/.This allows Lua code submitted as an
EnvoyExtensionPolicyto read arbitrary files from the gateway controller pod's filesystem during Strict validation (the default), including:/etc/passwd//var/run/secrets/kubernetes.io/serviceaccount/token//certs/...//proc/self/environThese credentials can be used to read sensitive information from the K8s API Server or from the Gateway XDS server.
Patches
This has been patched in versions >= v1.7.4 and v1.8.1
//to/) so double-slash variants like//etc/passwdand//var/run/secrets/...are matched by the critical-path check..or..segment in any position and across both separator styles (catches/etc/./passwd,./etc/passwd,/etc/.).Workarounds
Please refer to the
Warningsection in Lua docs for measures to reduce risk.Credits
Envoy Gateway thanks @dashingDragon and @Donjon-Cerberus for reporting this issue.
References