Envoy Gateway: Authentication Bypass via Improper Input Validation in EnvoyExtensionPolicy Lua Allows Secret Disclosure
Description
Impact
The to_absolute_normalized_path function (security.lua:28-43) does not collapse redundant path separators (// → /). On Linux, //etc/passwd is equivalent to /etc/passwd (POSIX path semantics), but is_critical_path fails to match the double-slash variant because //etc/passwd does not start with /etc/.
This allows Lua code submitted as an EnvoyExtensionPolicy to read arbitrary files from the gateway controller pod's filesystem during Strict validation (the default), including:
/etc/passwd- Kubernetes SA tokens via
//var/run/secrets/kubernetes.io/serviceaccount/token - TLS certificates via
//certs/... - Process environment via
//proc/self/environ
These 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
- Collapse redundant path separators (
//to/) so double-slash variants like//etc/passwdand//var/run/secrets/...are matched by the critical-path check. - Rewrite the traversal check to reject any
.or..segment in any position and across both separator styles (catches/etc/./passwd,./etc/passwd,/etc/.).
Workarounds
Please refer to the Warning section in Lua docs for measures to reduce risk.
Credits
Envoy Gateway thanks @dashingDragon and @Donjon-Cerberus for reporting this issue.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/envoyproxy/gatewayGo | >= 1.8.0-rc.0, < 1.8.1 | 1.8.1 |
github.com/envoyproxy/gatewayGo | < 1.7.4 | 1.7.4 |
Affected products
30- Range: >=v1.7.4, >=v1.8.1
- osv-coords29 versionspkg:apk/chainguard/datadog-cluster-agent-7.73pkg:apk/chainguard/datadog-cluster-agent-7.74pkg:apk/chainguard/datadog-cluster-agent-7.76pkg:apk/chainguard/datadog-cluster-agent-7.77pkg:apk/chainguard/datadog-cluster-agent-7.78pkg:apk/chainguard/datadog-cluster-agent-7.79pkg:apk/chainguard/datadog-cluster-agent-7.80pkg:apk/chainguard/datadog-cluster-agent-fips-7.73pkg:apk/chainguard/datadog-cluster-agent-fips-7.74pkg:apk/chainguard/datadog-cluster-agent-fips-7.76pkg:apk/chainguard/datadog-cluster-agent-fips-7.77pkg:apk/chainguard/datadog-cluster-agent-fips-7.78pkg:apk/chainguard/datadog-cluster-agent-fips-7.79pkg:apk/chainguard/datadog-cluster-agent-fips-7.80pkg:apk/chainguard/gitlab-operatorpkg:apk/chainguard/gitlab-operator-fipspkg:apk/chainguard/tigera-operator-1.40pkg:apk/chainguard/tigera-operator-1.42pkg:apk/chainguard/tigera-operator-fips-1.40pkg:apk/chainguard/tigera-operator-fips-1.42pkg:apk/wolfi/datadog-cluster-agent-7.73pkg:apk/wolfi/datadog-cluster-agent-7.74pkg:apk/wolfi/datadog-cluster-agent-7.76pkg:apk/wolfi/datadog-cluster-agent-7.77pkg:apk/wolfi/datadog-cluster-agent-7.78pkg:apk/wolfi/datadog-cluster-agent-7.79pkg:apk/wolfi/datadog-cluster-agent-7.80pkg:apk/wolfi/tigera-operator-1.40pkg:apk/wolfi/tigera-operator-1.42
< 7.73.3-r23+ 28 more
- (no CPE)range: < 7.73.3-r23
- (no CPE)range: < 7.74.1-r24
- (no CPE)range: < 7.76.3-r32
- (no CPE)range: < 7.77.3-r23
- (no CPE)range: < 7.78.4-r16
- (no CPE)range: < 7.79.2-r15
- (no CPE)range: < 7.80.4-r7
- (no CPE)range: < 7.73.3-r26
- (no CPE)range: < 7.74.1-r26
- (no CPE)range: < 7.76.3-r32
- (no CPE)range: < 7.77.3-r29
- (no CPE)range: < 7.78.4-r14
- (no CPE)range: < 7.79.2-r8
- (no CPE)range: < 7.80.4-r5
- (no CPE)range: < 3.1.2-r1
- (no CPE)range: < 3.2.0-r0
- (no CPE)range: < 1.40.13-r4
- (no CPE)range: < 1.42.4-r2
- (no CPE)range: < 1.40.13-r5
- (no CPE)range: < 1.42.4-r4
- (no CPE)range: < 7.73.3-r23
- (no CPE)range: < 7.74.1-r24
- (no CPE)range: < 7.76.3-r32
- (no CPE)range: < 7.77.3-r23
- (no CPE)range: < 7.78.4-r16
- (no CPE)range: < 7.79.2-r15
- (no CPE)range: < 7.80.4-r7
- (no CPE)range: < 1.40.13-r4
- (no CPE)range: < 1.42.4-r2
Patches
Vulnerability mechanics
References
2News mentions
0No linked articles in our index yet.