
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-41246 is a Lua code injection vulnerability in Contour, a Kubernetes ingress controller using Envoy proxy, affecting versions v1.19.0 through v1.33.3, v1.32.4, and v1.31.5. An attacker with RBAC permissions to create or modify HTTPProxy resources can inject arbitrary Lua code via the cookie rewrite path policy fields, resulting in code execution within the shared Envoy proxy. The vulnerability was published on April 23, 2026, with patches released the same day. It carries a CVSS v3.1 base score of 8.1 (High) (GitHub Advisory, Red Hat).
The root cause is improper control of code generation (CWE-94): Contour's cookie rewriting feature is implemented via Envoy's HTTP Lua filter, and user-controlled values from spec.routes[].cookieRewritePolicies[].pathRewrite.value or spec.routes[].services[].cookieRewritePolicies[].pathRewrite.value are interpolated directly into Lua source code using Go's text/template package without sufficient sanitization. An attacker with legitimate RBAC access to create or modify HTTPProxy resources can craft a malicious pathRewrite.value containing Lua code that breaks out of the template context and executes within the Envoy process. The injected code executes when HTTP traffic is processed on the attacker's own route, but because Envoy is shared infrastructure, the code runs in a context with access to resources belonging to other tenants (GitHub Advisory, Red Hat Bugzilla).
Successful exploitation allows an attacker to execute arbitrary Lua code within the shared Envoy proxy process. Because Envoy runs as shared infrastructure, the injected code can read Envoy's xDS client credentials from the filesystem — potentially exposing TLS certificates and private keys belonging to other tenants — and can cause denial of service for other tenants sharing the same Envoy instance. Confidentiality and availability are both rated High, while integrity is not directly impacted by this vulnerability (GitHub Advisory).
No public proof-of-concept exploit code is known to exist, and there is no evidence of in-the-wild exploitation at this time (Feedly). The vulnerability requires the attacker to already hold Kubernetes RBAC permissions to create or modify HTTPProxy resources, limiting the attack surface to authenticated, privileged cluster users. The EPSS score is approximately 0.072% (0.000720), indicating a low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog.
HTTPProxy resources in the target namespace, either through legitimate access or credential compromise.pathRewrite.value in spec.routes[].cookieRewritePolicies[].pathRewrite.value or spec.routes[].services[].cookieRewritePolicies[].pathRewrite.value. The value should contain Lua code that breaks out of the Go text/template interpolation context, for example by injecting Lua string delimiters and appending arbitrary Lua statements.kubectl apply -f malicious-httpproxy.yaml).HTTPProxy resources by non-administrative users, particularly those containing unusual characters (e.g., Lua string delimiters ]], --, end) in cookieRewritePolicies[].pathRewrite.value fields./certs/ or similar paths).Upgrade Contour to one of the patched versions: v1.33.4 (removes text/template usage entirely; user-provided values are passed as structured data via Envoy's filterContext — requires Envoy 1.35.0 or later), v1.32.5, or v1.31.6 (both escape user-provided values before interpolation into Lua code). There are no supported workarounds; upgrading is the only remediation. As a defense-in-depth measure, restrict Kubernetes RBAC permissions for creating and modifying HTTPProxy resources to trusted administrators only, and audit existing HTTPProxy resources for suspicious cookieRewritePolicies[].pathRewrite.value entries (GitHub Advisory, v1.33.4 Release, v1.32.5 Release, v1.31.6 Release).
The vulnerability was reported by researchers credited as b0b0haha and kodareef5 in the GitHub Security Advisory. Red Hat tracked the issue via Bugzilla (Bug 2461257) and assigned it a high severity rating. Social media activity was limited, with brief mentions on Mastodon and aggregation by vulnerability tracking services shortly after disclosure (GitHub Advisory, Red Hat Bugzilla).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."