Contour Kubernetes Ingress: Lua Code Injection Leads to Envoy RCE

Contour Kubernetes Ingress: Lua Code Injection Leads to Envoy RCE

The National Vulnerability Database has detailed CVE-2026-41246, affecting Contour, a Kubernetes ingress controller leveraging Envoy proxy. Versions from v1.19.0 up to, but not including, v1.33.4, v1.32.5, and v1.31.6 are vulnerable to Lua code injection within the Cookie Rewriting feature. An attacker with RBAC permissions to create or modify HTTPProxy resources can inject malicious Lua code into spec.routes[].cookieRewritePolicies[].pathRewrite.value or spec.routes[].services[].cookieRewritePolicies[].pathRewrite.value fields. This ultimately leads to arbitrary code execution within the Envoy proxy.

While the injected code only executes when processing traffic on the attacker’s own controlled route, the implications are severe given Envoy’s shared infrastructure nature. The National Vulnerability Database states that this vulnerability could allow an attacker to read Envoy’s xDS client credentials directly from the filesystem or trigger denial-of-service conditions for other tenants sharing the same Envoy instance. This isn’t just about isolated impact; it’s about compromise of shared components that underpin critical cluster functions. The vulnerability stems from insufficient sanitization of user-controlled values interpolated into Lua source code using Go’s text/template.

This isn’t a complex drive-by attack; it requires specific RBAC permissions. However, once those are obtained—perhaps through an earlier compromise or misconfiguration—the blast radius expands significantly. Defenders need to recognize that local code execution on shared infrastructure like Envoy is a critical pivot point for lateral movement and privilege escalation. The National Vulnerability Database confirms that this issue is resolved in Contour versions v1.33.4, v1.32.5, and v1.31.6.

What This Means For You

  • If your organization uses Contour as a Kubernetes ingress controller, you need to immediately identify your version. If it's between v1.19.0 and the patched versions (v1.33.4, v1.32.5, v1.31.6), prioritize upgrading to mitigate CVE-2026-41246. Also, audit your RBAC policies for HTTPProxy resource creation/modification to ensure only trusted users have these permissions. This is about preventing a privileged attacker from turning a route into an RCE vector on shared infrastructure.
🛡️ Am I exposed to this? Get detection rules for CVE-2026-41246 — Splunk, Sentinel, Elastic, QRadar & more

Related ATT&CK Techniques

🛡️ Detection Rules

3 rules · 6 SIEM formats

3 detection rules auto-generated for this incident, mapped to MITRE ATT&CK. Sigma YAML is free — export to any SIEM format via the Intel Bot.

critical T1190 Initial Access

Contour Cookie Rewrite Lua Code Injection - CVE-2026-41246

Sigma YAML — free preview
✓ Sigma · Splunk SPL Sentinel KQL Elastic QRadar AQL Wazuh Get rules for your SIEM →

Indicators of Compromise

IDTypeIndicator
CVE-2026-41246 Code Injection Contour Kubernetes ingress controller versions v1.19.0 to before v1.31.6, v1.32.5, v1.33.4
CVE-2026-41246 RCE Contour's Cookie Rewriting feature via spec.routes[].cookieRewritePolicies[].pathRewrite.value or spec.routes[].services[].cookieRewritePolicies[].pathRewrite.value
CVE-2026-41246 Information Disclosure Envoy proxy xDS client credentials from filesystem via Lua code injection
CVE-2026-41246 DoS Denial of Service for other tenants sharing the Envoy instance via Lua code injection
Source & Attribution
Source PlatformNVD
ChannelNational Vulnerability Database
PublishedApril 23, 2026 at 22:17 UTC

This content was AI-rewritten and enriched by Shimi's Cyber World based on the original source. All intellectual property rights remain with the original author.

Believe this infringes your rights? Submit a takedown request.

Related Posts

Critical RCE Flaw in radare2-mcp: Command Injection via JSON-RPC

CVE-2026-6942 — radare2-mcp version 1.6.0 and earlier contains an os command injection vulnerability that allows remote attackers to execute arbitrary commands by bypassing the command...

vulnerabilityCVEcriticalhigh-severityremote-code-executioncwe-78
/SCW Vulnerability Desk /CRITICAL /9.8 /⚑ 4 IOCs /⚙ 3 Sigma

CVE-2026-6941 — Its Project Notes Handling That Path Traversal

CVE-2026-6941 — radare2 prior to 6.1.4 contains a path traversal vulnerability in its project notes handling that allows attackers to read or write files outside...

vulnerabilityCVEmedium-severitypath-traversalcwe-59
/SCW Vulnerability Desk /MEDIUM /6.6 /⚑ 2 IOCs /⚙ 3 Sigma

Radare2 Path Traversal Flaw: Local Attackers Can Delete Arbitrary Directories

CVE-2026-6940 — radare2 prior to 6.1.4 contains a path traversal vulnerability in project deletion that allows local attackers to recursively delete arbitrary directories by supplying...

vulnerabilityCVEhigh-severitypath-traversalcwe-22
/SCW Vulnerability Desk /HIGH /7.1 /⚑ 1 IOC /⚙ 3 Sigma