Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-x4mj-7f9g-29h4
No affected components available
Impact
Contour's Cookie Rewriting feature is vulnerable to Lua code injection. An attacker with RBAC permissions to create or modify HTTPProxy resources can craft a malicious value in the following fields that results in arbitrary code execution in the Envoy proxy:
spec.routes[].cookieRewritePolicies[].pathRewrite.valuespec.routes[].services[].cookieRewritePolicies[].pathRewrite.value
The cookie rewriting feature is internally implemented using Envoy's HTTP Lua filter. User-controlled values are interpolated into Lua source code using Go text/template without sufficient sanitization.
The injected code only executes when processing traffic on the attacker's own route, which they already control. However, since Envoy runs as shared infrastructure, the injected code can also:
- Read Envoy's xDS client credentials from the filesystem, which could be used to read all Contour xDS configuration, including TLS certificates and private keys of other tenants.
- Cause denial of service for other tenants sharing the Envoy instance.
Other use cases of Lua filter are not vulnerable.
Patches
The fix is available in Contour v1.33.4, v1.32.5, and v1.31.6.
- v1.33.4: User-provided values are no longer interpolated into Lua code. Use of
text/templateis removed. Requires Envoy 1.35.0 or later. - v1.32.5, v1.31.6: User-provided values are escaped before interpolation into Lua code.
Workarounds
There are no workarounds. Users should upgrade to a patched version.
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker needs basic access or low-level privileges. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a high impact on the confidentiality of the information. There is a high impact on the availability of the system.
Exploitation activity has been observed. Apply available patches or mitigations urgently.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard