Contour: Lua code injection via Cookie Path Rewrite Policy
Published Apr 23, 2026
8.1
HIGHCVSS 3.1
EPSS 0.83%
Description
Contour is a Kubernetes ingress controller using Envoy proxy. From v1.19.0 to before v1.33.4, v1.32.5, and v1.31.6, 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 spec.routes[].cookieRewritePolicies[].pathRewrite.value or spec.routes[].services[].cookieRewritePolicies[].pathRewrite.value that results in arbitrary code execution in the Envoy proxy. 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 or cause denial of service for other tenants sharing the Envoy instance. This vulnerability is fixed in v1.33.4, v1.32.5, and v1.31.6.
Affected products
-
- Version >= 1.19.0, < 1.31.6StatusaffectedConstraints-
- Version >= 1.32.0, < 1.32.5StatusaffectedConstraints-
- Version >= 1.33.0, < 1.33.4StatusaffectedConstraints-
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Projectcontour | Contour | n/a |
|
- ≥ 1.19.0 · < 1.31.6
- ≥ 1.32.0 · < 1.32.5
- ≥ 1.33.0 · < 1.33.4
No data.
ExternalDNS Operator
edo/external-dns-rhel8
Not affected
ExternalDNS Operator
edo/external-dns-rhel9
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| ExternalDNS Operator | edo/external-dns-rhel8 | Not affected | n/a |
| ExternalDNS Operator | edo/external-dns-rhel9 | Not affected | n/a |
github.com/projectcontour/contour
Go
Introduced 1.19.0 Fixed 1.31.6github.com/projectcontour/contour
Go
Introduced 1.32.0 Fixed 1.32.5github.com/projectcontour/contour
Go
Introduced 1.33.0 Fixed 1.33.4
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Go | github.com/projectcontour/contour | 1.19.0 | 1.31.6 |
| Go | github.com/projectcontour/contour | 1.32.0 | 1.32.5 |
| Go | github.com/projectcontour/contour | 1.33.0 | 1.33.4 |
Remediation
Red Hat statement
This is an Important vulnerability in Contour's Cookie Rewriting feature, allowing arbitrary code execution and denial of service. An attacker with Role-Based Access Control (RBAC) permissions to create or modify HTTPProxy resources can inject malicious Lua code into the Envoy proxy. This could lead to unauthorized access to sensitive credentials or disrupt services for other tenants sharing the Envoy instance.
Metrics
No CVSS v4.0 score for this CVE.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
No CVSS v3.0 score for this CVE.
No CVSS v2.0 score for this CVE.
This CVE is not in the KEV list.
CISA SSVC (Vulnrichment)
Stakeholder-Specific Vulnerability Categorization from CISA ADP.
Exploitation
NoneAutomatable
NoTechnical Impact
PartialDecision
n/aAssessed Apr 24, 2026 · SSVC 2.0.3
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
Apr–Oct 2026- EPSS v4
- EPSS v5
Percentile over time
- EPSS v4
- EPSS v5
Table of values (3 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 0.83% (0.00828) | 55.94th | v5 (v2026.06.15) |
| Jun 15, 2026 | 0.44% (0.00441) | 34.94th | v5 (v2026.06.15) |
| Apr 24, 2026 | 0.07% (0.00072) | 21.76th | v4 (v2025.03.14) |
References (12)
- https://access.redhat.com/security/cve/CVE-2026-41246 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2461257 Issue Tracking
- https://github.com/advisories/GHSA-x4mj-7f9g-29h4 Advisory
- https://github.com/projectcontour/contour/releases/tag/v1.31.6 x_refsource_MISCRelease Notes
- https://github.com/projectcontour/contour/releases/tag/v1.32.5 x_refsource_MISCRelease Notes
- https://github.com/projectcontour/contour/releases/tag/v1.33.4 x_refsource_MISCRelease Notes
- https://github.com/projectcontour/contour/security/advisories/GHSA-x4mj-7f9g-29h4 x_refsource_CONFIRMPatchVendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2026-41246
- https://projectcontour.io/docs/1.33/config/cookie-rewriting
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-41246.json
- https://www.cve.org/CVERecord?id=CVE-2026-41246
- https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/lua_filter
| Link | Providers | Tags |
|---|---|---|
| https://access.redhat.com/security/cve/CVE-2026-41246 | Vendor Advisory | |
| https://bugzilla.redhat.com/show_bug.cgi?id=2461257 | Issue Tracking | |
| https://github.com/advisories/GHSA-x4mj-7f9g-29h4 | Advisory | |
| https://github.com/projectcontour/contour/releases/tag/v1.31.6 | x_refsource_MISCRelease Notes | |
| https://github.com/projectcontour/contour/releases/tag/v1.32.5 | x_refsource_MISCRelease Notes | |
| https://github.com/projectcontour/contour/releases/tag/v1.33.4 | x_refsource_MISCRelease Notes | |
| https://github.com/projectcontour/contour/security/advisories/GHSA-x4mj-7f9g-29h4 | x_refsource_CONFIRMPatchVendor Advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-41246 | ||
| https://projectcontour.io/docs/1.33/config/cookie-rewriting | ||
| https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-41246.json | ||
| https://www.cve.org/CVERecord?id=CVE-2026-41246 | ||
| https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/lua_filter |
Change history (0)
No recorded changes yet.