Cyber Resilience

CVE-2026-41246

RCE in Projectcontour Contour 1.19.0 – 1.31.6

Published
23 April 2026
Modified
15 July 2026
Patch / advisory
CVSS Score v3.1 8.1
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
EPSS Score 0.0048 39th percentile
Risk Priority 60 floored blend · peak EPSS

Summary

CVE-2026-41246 is a high-severity Code Injection (CWE-94) vulnerability in Projectcontour Contour. Its CVSS base score is 8.1 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Command and Scripting Interpreter (T1059); ranked at the 39th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2026-41246 is a Lua code injection vulnerability in Contour, an open-source Kubernetes ingress controller that uses the Envoy proxy. The issue affects Contour versions from v1.19.0 up to but not including v1.33.4, v1.32.5, and v1.31.6, specifically within the Cookie Rewriting feature. This feature is implemented using Envoy's HTTP Lua filter, where user-controlled values from HTTPProxy resources are interpolated into Lua source code via Go's text/template package without adequate sanitization, enabling arbitrary code execution in the Envoy proxy.

An attacker requires RBAC permissions to create or modify HTTPProxy resources in the cluster. They can exploit this by crafting a malicious value in fields such as spec.routes[].cookieRewritePolicies[].pathRewrite.value or spec.routes[].services[].cookieRewritePolicies[].pathRewrite.value. The injected code executes only when processing traffic on the attacker's controlled route. However, as Envoy operates as shared infrastructure, the code can access Envoy's xDS client credentials from the filesystem or trigger denial of service impacting other tenants sharing the same Envoy instance. The vulnerability has a CVSS v3.1 base score of 8.1 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H) and is associated with CWE-94 (Improper Control of Generation of Code).

Project Contour has addressed the vulnerability in releases v1.33.4, v1.32.5, and v1.31.6, as detailed in their GitHub release notes and security advisory (GHSA-x4mj-7f9g-29h4). Security practitioners should upgrade affected Contour deployments to one of these patched versions to mitigate the risk.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1059 Command and Scripting Interpreter Execution
Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries.
T1059.001 PowerShell Execution
Adversaries may abuse PowerShell commands and scripts for execution.
T1059.002 AppleScript Execution
Adversaries may abuse AppleScript for execution.
T1059.004 Unix Shell Execution
Adversaries may abuse Unix shell commands and scripts for execution.
T1059.005 Visual Basic Execution
Adversaries may abuse Visual Basic (VB) for execution.
T1059.006 Python Execution
Adversaries may abuse Python commands and scripts for execution.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2024-36539Same product: Projectcontour Contour
CVE-2026-1340Shared CWE-94
CVE-2024-54724Shared CWE-94
CVE-2013-3906Shared CWE-94
CVE-2023-25261Shared CWE-94
CVE-2026-16144Shared CWE-94
CVE-2026-41196Shared CWE-94
CVE-2026-33336Shared CWE-94
CVE-2025-62521Shared CWE-94
CVE-2023-31415Shared CWE-94

Affected Assets

projectcontour
contour
1.19.0 — 1.31.6 · 1.32.0 — 1.32.5 · 1.33.0 — 1.33.4

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.3.1

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and evaluation finds code paths that accept and execute externally influenced strings.

Input validation directly stops untrusted data from being used to construct executable code without neutralization.

Least privilege limits the damage an injected code fragment can perform once executed.

Requiring documented secure development standards and tools enforces use of safe code-generation APIs and escaping.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

PR.PS-06's SDLC practices directly target injection flaws via secure coding and testing (mostly), yet as a single broad outcome it leaves many code-generation specifics unaddressed (partial).

PR.DS-10 none match
prevents

PR.DS-10 protects runtime data confidentiality/integrity but has no bearing on neutralizing externally influenced input during code generation, so neither direction shows any preventive effect.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

prevents

Banning unapproved code samples and unauthenticated web services, combined with secure-coding standards and SAST, prevents the dynamic generation or inclusion of attacker-supplied code.

none

Controls that restrict unauthorized or malicious code from being introduced via external networks or removable media limit opportunities for an attacker to inject and execute arbitrary code.

References