← Back to CVE Explorer

CVE-2026-41246

Full vulnerability record from the local CVENow database.

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.

Severity
HIGH
CVSS score
8.1 (v3.1)
Vulnerability status
Modified
Source identifier
Published
2026-04-23 19:17:29.670000
Last modified
2026-10-26 22:10:00.163000
View original CVE JSON
{
  "id": "CVE-2026-41246",
  "sourceIdentifier": "[email protected]",
  "published": "2026-04-23T19:17:29.670",
  "lastModified": "2026-10-26T22:10:00.163",
  "vulnStatus": "Modified",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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."
    },
    {
      "lang": "es",
      "value": "Contour es un controlador de entrada de Kubernetes que utiliza el proxy Envoy. Desde la v1.19.0 hasta antes de la v1.33.4, v1.32.5 y v1.31.6, la característica de reescritura de cookies de Contour es una vulnerabilidad a la inyección de código Lua. Un atacante con permisos RBAC para crear o modificar recursos HTTPProxy puede elaborar un valor malicioso en spec.routes[].cookieRewritePolicies[].pathRewrite.value o spec.routes[].services[].cookieRewritePolicies[].pathRewrite.value que resulta en ejecución de código arbitrario en el proxy Envoy. La característica de reescritura de cookies se implementa internamente utilizando el filtro HTTP Lua de Envoy. Los valores controlados por el usuario se interpolan en el código fuente Lua utilizando Go text/template sin suficiente sanitización. El código inyectado solo se ejecuta al procesar tráfico en la propia ruta del atacante, la cual ya controlan. Sin embargo, dado que Envoy se ejecuta como infraestructura compartida, el código inyectado también puede leer las credenciales de cliente xDS de Envoy del sistema de archivos o causar denegación de servicio para otros inquilinos que comparten la instancia de Envoy. Esta vulnerabilidad se corrige en v1.33.4, v1.32.5 y v1.31.6."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "projectcontour",
          "product": "contour",
          "versions": [
            {
              "version": ">= 1.33.0, < 1.33.4",
              "status": "affected"
            },
            {
              "version": ">= 1.32.0, < 1.32.5",
              "status": "affected"
            },
            {
              "version": ">= 1.19.0, < 1.31.6",
              "status": "affected"
            }
          ]
        }
      ]
    },
    {
      "source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c",
      "affectedData": [
        {
          "vendor": "Red Hat",
          "product": "ExternalDNS Operator",
          "defaultStatus": "unaffected",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "packageName": "edo/external-dns-rhel8",
          "cpes": [
            "cpe:/a:redhat:ext_dns_optr:1"
          ]
        },
        {
          "vendor": "Red Hat",
          "product": "ExternalDNS Operator",
          "defaultStatus": "unaffected",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "packageName": "edo/external-dns-rhel9",
          "cpes": [
            "cpe:/a:redhat:ext_dns_optr:1"
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H",
          "baseScore": 8.1,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 2.8,
        "impactScore": 5.2
      },
      {
        "source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H",
          "baseScore": 8.1,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 2.8,
        "impactScore": 5.2
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-04-24T14:15:49.308320Z",
          "id": "CVE-2026-41246",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-94"
        }
      ]
    },
    {
      "source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-94"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:projectcontour:contour:*:*:*:*:*:kubernetes:*:*",
              "versionStartIncluding": "1.19.0",
              "versionEndExcluding": "1.31.6",
              "matchCriteriaId": "F12B6476-CE93-4179-8E57-262B3B16BBF3"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:projectcontour:contour:*:*:*:*:*:kubernetes:*:*",
              "versionStartIncluding": "1.32.0",
              "versionEndExcluding": "1.32.5",
              "matchCriteriaId": "8617079B-4259-433B-B3BB-55AC5F8B2C8A"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:projectcontour:contour:*:*:*:*:*:kubernetes:*:*",
              "versionStartIncluding": "1.33.0",
              "versionEndExcluding": "1.33.4",
              "matchCriteriaId": "DBE830D3-D4B3-4DB4-A02D-F391F3007E33"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/projectcontour/contour/releases/tag/v1.31.6",
      "source": "[email protected]",
      "tags": [
        "Release Notes"
      ]
    },
    {
      "url": "https://github.com/projectcontour/contour/releases/tag/v1.32.5",
      "source": "[email protected]",
      "tags": [
        "Release Notes"
      ]
    },
    {
      "url": "https://github.com/projectcontour/contour/releases/tag/v1.33.4",
      "source": "[email protected]",
      "tags": [
        "Release Notes"
      ]
    },
    {
      "url": "https://github.com/projectcontour/contour/security/advisories/GHSA-x4mj-7f9g-29h4",
      "source": "[email protected]",
      "tags": [
        "Patch",
        "Vendor Advisory"
      ]
    },
    {
      "url": "https://access.redhat.com/security/cve/CVE-2026-41246",
      "source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c"
    },
    {
      "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2461257",
      "source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c"
    },
    {
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-41246.json",
      "source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c"
    }
  ]
}