CVE-2026-41246: CWE-94: Improper Control of Generation of Code ('Code Injection') in projectcontour contour
CVE-2026-41246 is a high-severity vulnerability in the Contour Kubernetes ingress controller's Cookie Rewriting feature. It allows an attacker with RBAC permissions to create or modify HTTPProxy resources to inject arbitrary Lua code into the Envoy proxy via crafted cookieRewritePolicies pathRewrite values. This code executes within Envoy's Lua HTTP filter, potentially leading to reading sensitive xDS client credentials or causing denial of service for other tenants sharing the Envoy instance. The vulnerability affects Contour versions from 1. 19. 0 up to but not including 1. 31. 6, 1. 32. 5, and 1.
AI Analysis
Technical Summary
Contour, a Kubernetes ingress controller using Envoy proxy, has a code injection vulnerability (CWE-94) in its Cookie Rewriting feature. Versions from 1.19.0 to before 1.31.6, 1.32.5, and 1.33.4 allow attackers with RBAC permissions to inject Lua code via spec.routes[].cookieRewritePolicies[].pathRewrite.value fields. The injection occurs because user input is interpolated into Lua source code without sufficient sanitization using Go text/template. The injected code executes when processing traffic on the attacker-controlled route but can access Envoy's xDS client credentials or cause denial of service affecting other tenants sharing the Envoy instance. The vulnerability has a CVSS 3.1 score of 8.1 (high severity).
Potential Impact
An attacker with permissions to create or modify HTTPProxy resources can execute arbitrary Lua code within the Envoy proxy process. This can lead to unauthorized reading of sensitive xDS client credentials and denial of service conditions impacting other tenants sharing the Envoy instance. The attack is limited to routes controlled by the attacker but leverages shared infrastructure to escalate impact. The vulnerability does not require user interaction and has a low attack complexity but requires some privileges (RBAC).
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The description notes that the vulnerability is fixed in Contour versions 1.33.4, 1.32.5, and 1.31.6. Users should upgrade to these or later versions to remediate the issue. Until patched, restrict RBAC permissions to prevent unauthorized creation or modification of HTTPProxy resources involving cookieRewritePolicies. Monitor vendor channels for official advisories and patches.
CVE-2026-41246: CWE-94: Improper Control of Generation of Code ('Code Injection') in projectcontour contour
Description
CVE-2026-41246 is a high-severity vulnerability in the Contour Kubernetes ingress controller's Cookie Rewriting feature. It allows an attacker with RBAC permissions to create or modify HTTPProxy resources to inject arbitrary Lua code into the Envoy proxy via crafted cookieRewritePolicies pathRewrite values. This code executes within Envoy's Lua HTTP filter, potentially leading to reading sensitive xDS client credentials or causing denial of service for other tenants sharing the Envoy instance. The vulnerability affects Contour versions from 1. 19. 0 up to but not including 1. 31. 6, 1. 32. 5, and 1.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Contour, a Kubernetes ingress controller using Envoy proxy, has a code injection vulnerability (CWE-94) in its Cookie Rewriting feature. Versions from 1.19.0 to before 1.31.6, 1.32.5, and 1.33.4 allow attackers with RBAC permissions to inject Lua code via spec.routes[].cookieRewritePolicies[].pathRewrite.value fields. The injection occurs because user input is interpolated into Lua source code without sufficient sanitization using Go text/template. The injected code executes when processing traffic on the attacker-controlled route but can access Envoy's xDS client credentials or cause denial of service affecting other tenants sharing the Envoy instance. The vulnerability has a CVSS 3.1 score of 8.1 (high severity).
Potential Impact
An attacker with permissions to create or modify HTTPProxy resources can execute arbitrary Lua code within the Envoy proxy process. This can lead to unauthorized reading of sensitive xDS client credentials and denial of service conditions impacting other tenants sharing the Envoy instance. The attack is limited to routes controlled by the attacker but leverages shared infrastructure to escalate impact. The vulnerability does not require user interaction and has a low attack complexity but requires some privileges (RBAC).
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The description notes that the vulnerability is fixed in Contour versions 1.33.4, 1.32.5, and 1.31.6. Users should upgrade to these or later versions to remediate the issue. Until patched, restrict RBAC permissions to prevent unauthorized creation or modification of HTTPProxy resources involving cookieRewritePolicies. Monitor vendor channels for official advisories and patches.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-18T03:47:03.135Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69ea9e7887115cfb686fc39e
Added to database: 4/23/2026, 10:34:32 PM
Last enriched: 4/23/2026, 11:21:43 PM
Last updated: 4/24/2026, 7:07:05 AM
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.