Skip to main content

CVE-2026-41246 — Vulnerability in projectcontour/contour — CVE Details

HIGH

Contour has Lua code injection via Cookie Path Rewrite Policy

Published April 24, 2026Updated September 10, 2026Source: OSV

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.

Check my go.sum

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.value
  • spec.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/template is 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
Update github.com/projectcontour/contour to 1.31.6 or later
go get github.com/projectcontour/contour@v1.31.6
Go
Update github.com/projectcontour/contour to 1.33.4 or later
go get github.com/projectcontour/contour@v1.33.4
Go
Update github.com/projectcontour/contour to 1.32.5 or later
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).

PackageFixed In
github.com/projectcontour/contour Go · Affected: All versions1.31.6
github.com/projectcontour/contour Go · Affected: All versions1.33.4
github.com/projectcontour/contour Go · Affected: All versions1.32.5

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

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

CVSS Score
8.1

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.86%
EPSS percentile: 56

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

GHSA-x4mj-7f9g-29h4
BIT-contour-2026-41246
GO-2026-5738

Related CVEs

  • CVE-2026-108262
    HIGH

    DDEV incomplete tar symlink traversal fix allows host file overwrite - Incomplete fix of CVE-2026-32885

  • CVE-2026-130007
    HIGH

    k8s-mcp-server: Missing authentication on default SSE/HTTP transport allows unauthenticated Kubernetes tool execution

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my go.sum