Skip to content
OpenAdvisories
High · 8.1 CVE-2026-41246 BIT-contour-2026-41246EUVD-2026-25280GHSA-x4mj-7f9g-29h4GO-2026-5738

Contour: Lua code injection via Cookie Path Rewrite Policy

Published Apr 23, 2026 · Updated Jul 15, 2026 · Assigned by GitHub_M

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

VendorProductAffectedFixed
projectcontour contour >= 1.33.0, < 1.33.4, >= 1.32.0, < 1.32.5, >= 1.19.0, < 1.31.6 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
openSUSE Leap 16.0 govulncheck-vulndb 0.0.20260723T184607-160000.1.1 openSUSE-SU-2026:21483-1

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling external-dns-0.21 0.21.0-r1 —
Wolfi rolling k8s_gateway 1.7.1-r1 —

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/projectcontour/contour >= 1.19.0, < 1.31.6 1.31.6 GHSA-x4mj-7f9g-29h4
Go github.com/projectcontour/contour >= 1.32.0, < 1.32.5 1.32.5 GHSA-x4mj-7f9g-29h4
Go github.com/projectcontour/contour >= 1.33.0, < 1.33.4 1.33.4 GHSA-x4mj-7f9g-29h4
Go github.com/projectcontour/contour >= 1.19.0, < 1.31.6 · >= 1.32.0, < 1.32.5 · >= 1.33.0, < 1.33.4 1.31.6, 1.32.5, 1.33.4 GO-2026-5738

Advisories 1

References