Skip to content

Commit 439cff0

Browse files
1 parent 36c5a42 commit 439cff0

1 file changed

Lines changed: 119 additions & 0 deletions

File tree

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-x4mj-7f9g-29h4",
4+
"modified": "2026-04-24T15:19:49Z",
5+
"published": "2026-04-24T15:19:49Z",
6+
"aliases": [
7+
"CVE-2026-41246"
8+
],
9+
"summary": "Contour has Lua code injection via Cookie Path Rewrite Policy",
10+
"details": "### Impact\n\nContour's [Cookie Rewriting](https://projectcontour.io/docs/1.33/config/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:\n\n- `spec.routes[].cookieRewritePolicies[].pathRewrite.value`\n- `spec.routes[].services[].cookieRewritePolicies[].pathRewrite.value`\n\nThe cookie rewriting feature is internally implemented using Envoy's [HTTP Lua filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/lua_filter). User-controlled values are interpolated into Lua source code using Go `text/template` without sufficient sanitization.\n\nThe 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:\n\n- 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.\n- Cause denial of service for other tenants sharing the Envoy instance.\n\nOther use cases of Lua filter are not vulnerable.\n\n### Patches\n\nThe fix is available in Contour [v1.33.4](https://github.com/projectcontour/contour/releases/tag/v1.33.4), [v1.32.5](https://github.com/projectcontour/contour/releases/tag/v1.32.5), and [v1.31.6](https://github.com/projectcontour/contour/releases/tag/v1.31.6).\n\n- 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.\n- v1.32.5, v1.31.6: User-provided values are escaped before interpolation into Lua code.\n\n### Workarounds\n\nThere are no workarounds. Users should upgrade to a patched version.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Go",
21+
"name": "github.com/projectcontour/contour"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "1.19.0"
29+
},
30+
{
31+
"fixed": "1.31.6"
32+
}
33+
]
34+
}
35+
]
36+
},
37+
{
38+
"package": {
39+
"ecosystem": "Go",
40+
"name": "github.com/projectcontour/contour"
41+
},
42+
"ranges": [
43+
{
44+
"type": "ECOSYSTEM",
45+
"events": [
46+
{
47+
"introduced": "1.32.0"
48+
},
49+
{
50+
"fixed": "1.32.5"
51+
}
52+
]
53+
}
54+
]
55+
},
56+
{
57+
"package": {
58+
"ecosystem": "Go",
59+
"name": "github.com/projectcontour/contour"
60+
},
61+
"ranges": [
62+
{
63+
"type": "ECOSYSTEM",
64+
"events": [
65+
{
66+
"introduced": "1.33.0"
67+
},
68+
{
69+
"fixed": "1.33.4"
70+
}
71+
]
72+
}
73+
]
74+
}
75+
],
76+
"references": [
77+
{
78+
"type": "WEB",
79+
"url": "https://github.com/projectcontour/contour/security/advisories/GHSA-x4mj-7f9g-29h4"
80+
},
81+
{
82+
"type": "ADVISORY",
83+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-41246"
84+
},
85+
{
86+
"type": "PACKAGE",
87+
"url": "https://github.com/projectcontour/contour"
88+
},
89+
{
90+
"type": "WEB",
91+
"url": "https://github.com/projectcontour/contour/releases/tag/v1.31.6"
92+
},
93+
{
94+
"type": "WEB",
95+
"url": "https://github.com/projectcontour/contour/releases/tag/v1.32.5"
96+
},
97+
{
98+
"type": "WEB",
99+
"url": "https://github.com/projectcontour/contour/releases/tag/v1.33.4"
100+
},
101+
{
102+
"type": "WEB",
103+
"url": "https://projectcontour.io/docs/1.33/config/cookie-rewriting"
104+
},
105+
{
106+
"type": "WEB",
107+
"url": "https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/lua_filter"
108+
}
109+
],
110+
"database_specific": {
111+
"cwe_ids": [
112+
"CWE-94"
113+
],
114+
"severity": "HIGH",
115+
"github_reviewed": true,
116+
"github_reviewed_at": "2026-04-24T15:19:49Z",
117+
"nvd_published_at": "2026-04-23T19:17:29Z"
118+
}
119+
}

0 commit comments

Comments
 (0)