{"answers":{"affected":"8 open source packages ship an affected version, including github.com/projectcontour/contour and contour. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-41246 in the wild and no public exploit code.","fix":"Upgrade github.com/projectcontour/contour to a fixed version for your release line: 1.31.6, 1.32.5 or 1.33.4.","what":"CVE-2026-41246 is a high-severity code injection vulnerability in projectcontour contour, published on 23 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-41246 and fix it if it is affected.\n\nWhat it is: CVE-2026-41246 is a high-severity code injection vulnerability in projectcontour contour, published on 23 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-41246 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/projectcontour/contour (Go): affected from 1.19.0; fixed in 1.31.6, 1.32.5, 1.33.4\n- github.com/projectcontour/contour (Go): affected from 1.19.0; fixed in 1.31.6\n- github.com/projectcontour/contour (Go): affected from 1.19.0; fixed in 1.31.6\n- github.com/projectcontour/contour (Go): affected from 1.32.0; fixed in 1.32.5\n- github.com/projectcontour/contour (Go): affected from 1.32.0; fixed in 1.32.5\n- github.com/projectcontour/contour (Go): affected from 1.33.0; fixed in 1.33.4\n- github.com/projectcontour/contour (Go): affected from 1.33.0; fixed in 1.33.4\n- contour (Bitnami): affected from 1.19.0; fixed in 1.31.6, 1.32.5, 1.33.4\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-41246/ (Markdown: https://insights.sbomify.com/CVE-2026-41246/index.md)","id":"CVE-2026-41246","markdown":"https://insights.sbomify.com/CVE-2026-41246/index.md","name":"CVE-2026-41246","record":{"aliases":["BIT-contour-2026-41246","CLEANSTART-2026-AO30901","CLEANSTART-2026-CF12718","CLEANSTART-2026-PS68952","GHSA-x4mj-7f9g-29h4","GO-2026-5738","MINI-2p5x-cx7p-cgc7","MINI-68wr-6883-73r8"],"analysis":{"component_type":"container_or_infrastructure","fix_type":"upgrade","impacts":["code_execution","data_read","denial_of_service"],"network_reachable":"yes","non_default_config":true,"product_category":"Kubernetes ingress controller","requires_auth":"low_privilege","summary":"Attackers with RBAC permissions can inject Lua code via cookie rewrite policies, leading to code execution, credential theft, or denial of service in Envoy.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"contour","vendor":"projectcontour"}],"cvss":{"score":8.1,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"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.","ecosystems":["Bitnami","Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Contour: Lua code injection via Cookie Path Rewrite Policy","id":"CVE-2026-41246","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"code_injection","year":"2026"},"n_packages":8,"n_references":4,"next":{"headline":"elFinder: Command injection in resize background color parameter when using ImageMagick CLI","id":"CVE-2026-41247"},"packages":[{"ecosystem":"Bitnami","fixed":["1.31.6","1.32.5","1.33.4"],"introduced":["1.19.0","1.32.0","1.33.0"],"last_affected":[],"package":"contour","purl":"pkg:bitnami/contour","source":"BIT-contour-2026-41246"},{"ecosystem":"Go","fixed":["1.31.6","1.32.5","1.33.4"],"introduced":["1.19.0","1.32.0","1.33.0"],"last_affected":[],"package":"github.com/projectcontour/contour","purl":"pkg:golang/github.com/projectcontour/contour","source":"GO-2026-5738"},{"ecosystem":"Go","fixed":["1.31.6"],"introduced":["1.19.0"],"last_affected":[],"package":"github.com/projectcontour/contour","purl":null,"source":"GHSA-x4mj-7f9g-29h4"},{"ecosystem":"Go","fixed":["1.31.6"],"introduced":["1.19.0"],"last_affected":[],"package":"github.com/projectcontour/contour","purl":"pkg:golang/github.com/projectcontour/contour","source":"GHSA-x4mj-7f9g-29h4"},{"ecosystem":"Go","fixed":["1.32.5"],"introduced":["1.32.0"],"last_affected":[],"package":"github.com/projectcontour/contour","purl":null,"source":"GHSA-x4mj-7f9g-29h4"},{"ecosystem":"Go","fixed":["1.32.5"],"introduced":["1.32.0"],"last_affected":[],"package":"github.com/projectcontour/contour","purl":"pkg:golang/github.com/projectcontour/contour","source":"GHSA-x4mj-7f9g-29h4"},{"ecosystem":"Go","fixed":["1.33.4"],"introduced":["1.33.0"],"last_affected":[],"package":"github.com/projectcontour/contour","purl":null,"source":"GHSA-x4mj-7f9g-29h4"},{"ecosystem":"Go","fixed":["1.33.4"],"introduced":["1.33.0"],"last_affected":[],"package":"github.com/projectcontour/contour","purl":"pkg:golang/github.com/projectcontour/contour","source":"GHSA-x4mj-7f9g-29h4"}],"prev":{"headline":"Junrar: Path Traversal (Zip-Slip) via Sibling Directory Name Prefix","id":"CVE-2026-41245"},"products":["contour"],"published":"2026-04-23","related":[{"cvss_score":9.8,"headline":"Missing authorization in n/a","id":"CVE-2024-36539","kev_date_added":null,"published":"2024-07-24"},{"cvss_score":8.5,"headline":"Authorization bypass in Contour","id":"CVE-2021-32783","kev_date_added":null,"published":"2021-07-23"},{"cvss_score":7.5,"headline":"Denial of service in Contour","id":"CVE-2020-15127","kev_date_added":null,"published":"2020-08-05"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-07-15","vendors":["projectcontour"]},"summary":"Attackers with RBAC permissions can inject Lua code via cookie rewrite policies, leading to code execution, credential theft, or denial of service in Envoy.","url":"https://insights.sbomify.com/CVE-2026-41246/"}