CVE-2026-41246 — Vulnerability in projectcontour/contour — CVE Details
Contour has Lua code injection via Cookie Path Rewrite Policy
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.86%). Schedule for your next planned update.
Does your project use an affected github.com/projectcontour/contour version?
Paste your go.sum to check it for CVE-2026-41246 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published April 24, 2026 (216 days ago).
- Last revised September 10, 2026 — 139 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/projectcontour/contour@v1.31.6
go get github.com/projectcontour/contour@v1.33.4
go get github.com/projectcontour/contour@v1.32.5
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (3)
Affects 1 ecosystem: Go (1).
| Package | Fixed In |
|---|---|
| github.com/projectcontour/contour Go · Affected: All versions | 1.31.6 |
| github.com/projectcontour/contour Go · Affected: All versions | 1.33.4 |
| github.com/projectcontour/contour Go · Affected: All versions | 1.32.5 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-94Code InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.1 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
References
- https://github.com/projectcontour/contour/security/advisories/GHSA-x4mj-7f9g-29h4WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-41246ADVISORY
- https://access.redhat.com/security/cve/CVE-2026-41246WEB
- https://bugzilla.redhat.com/show_bug.cgi?id=2461257WEB
- https://github.com/projectcontour/contourPACKAGE
- https://github.com/projectcontour/contour/releases/tag/v1.31.6WEB
- https://github.com/projectcontour/contour/releases/tag/v1.32.5WEB
- https://github.com/projectcontour/contour/releases/tag/v1.33.4WEB
- https://projectcontour.io/docs/1.33/config/cookie-rewritingWEB
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-41246.jsonWEB
- https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/lua_filterWEB
Frequently Asked Questions
- What is CVE-2026-41246?
- Contour has Lua code injection via Cookie Path Rewrite Policy. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.1/10).
- How do I check if my project is affected by CVE-2026-41246?
- CVE-2026-41246 affects github.com/projectcontour/contour. It has a 0.9% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-41246 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is an above-median EPSS score — 56% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-108262HIGH
DDEV incomplete tar symlink traversal fix allows host file overwrite - Incomplete fix of CVE-2026-32885
- CVE-2026-130007HIGH
k8s-mcp-server: Missing authentication on default SSE/HTTP transport allows unauthenticated Kubernetes tool execution