CVE-2026-41246 (GCVE-0-2026-41246)

Vulnerability from cvelistv5 – Published: 2026-04-23 18:44 – Updated: 2026-06-30 12:08
VLAI
Title
Contour: Lua code injection via Cookie Path Rewrite Policy
Summary
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.
SSVC
Exploitation: none Automatable: no Technical Impact: partial
CISA Coordinator (v2.0.3)
CWE
  • CWE-94 - Improper Control of Generation of Code ('Code Injection')
Assigner
Impacted products
Vendor Product Version
projectcontour contour Affected: >= 1.33.0, < 1.33.4
Affected: >= 1.32.0, < 1.32.5
Affected: >= 1.19.0, < 1.31.6
Create a notification for this product.
Red Hat ExternalDNS Operator     cpe:/a:redhat:ext_dns_optr:1
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2026-41246",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-04-24T14:15:49.308320Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-04-24T18:20:40.823Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "affected": [
          {
            "cpes": [
              "cpe:/a:redhat:ext_dns_optr:1"
            ],
            "defaultStatus": "unaffected",
            "product": "ExternalDNS Operator",
            "vendor": "Red Hat"
          }
        ],
        "datePublic": "2026-04-23T18:44:39.907Z",
        "descriptions": [
          {
            "lang": "en",
            "value": "A flaw was found in Contour, a Kubernetes ingress controller. An attacker with Role-Based Access Control (RBAC) permissions to manage HTTPProxy resources can exploit a Lua code injection vulnerability within Contour\u0027s Cookie Rewriting feature. By crafting a malicious value in specific configuration fields, the attacker can achieve arbitrary code execution in the Envoy proxy. This could allow them to read sensitive credentials from the filesystem or cause a denial of service for other users sharing the Envoy instance."
          }
        ],
        "metrics": [
          {
            "other": {
              "content": {
                "namespace": "https://access.redhat.com/security/updates/classification/",
                "value": "Important"
              },
              "type": "Red Hat severity rating"
            }
          },
          {
            "cvssV3_1": {
              "attackComplexity": "LOW",
              "attackVector": "NETWORK",
              "availabilityImpact": "HIGH",
              "baseScore": 8.1,
              "baseSeverity": "HIGH",
              "confidentialityImpact": "HIGH",
              "integrityImpact": "NONE",
              "privilegesRequired": "LOW",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H",
              "version": "3.1"
            },
            "format": "CVSS"
          }
        ],
        "problemTypes": [
          {
            "descriptions": [
              {
                "cweId": "CWE-94",
                "description": "Improper Control of Generation of Code (\u0027Code Injection\u0027)",
                "lang": "en",
                "type": "CWE"
              }
            ]
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-06-30T12:08:48.916Z",
          "orgId": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c",
          "shortName": "redhat-SADP"
        },
        "references": [
          {
            "tags": [
              "vdb-entry",
              "x_refsource_REDHAT"
            ],
            "url": "https://access.redhat.com/security/cve/CVE-2026-41246"
          },
          {
            "name": "RHBZ#2461257",
            "tags": [
              "issue-tracking",
              "x_refsource_REDHAT"
            ],
            "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2461257"
          },
          {
            "tags": [
              "x_sadp-csaf-vex"
            ],
            "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-41246.json"
          }
        ],
        "timeline": [
          {
            "lang": "en",
            "time": "2026-04-23T20:01:47.199Z",
            "value": "Reported to Red Hat."
          },
          {
            "lang": "en",
            "time": "2026-04-23T18:44:39.907Z",
            "value": "Made public."
          }
        ],
        "title": "Contour: Envoy: github.com/projectcontour/contour: Contour: Arbitrary Code Execution and Denial of Service via Lua Code Injection",
        "x_adpType": "supplier",
        "x_generator": {
          "engine": "sadp-cli 1.0.0"
        }
      }
    ],
    "cna": {
      "affected": [
        {
          "product": "contour",
          "vendor": "projectcontour",
          "versions": [
            {
              "status": "affected",
              "version": "\u003e= 1.33.0, \u003c 1.33.4"
            },
            {
              "status": "affected",
              "version": "\u003e= 1.32.0, \u003c 1.32.5"
            },
            {
              "status": "affected",
              "version": "\u003e= 1.19.0, \u003c 1.31.6"
            }
          ]
        }
      ],
      "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\u0027s 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\u0027s 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\u0027s own route, which they already control. However, since Envoy runs as shared infrastructure, the injected code can also read Envoy\u0027s 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."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "attackComplexity": "LOW",
            "attackVector": "NETWORK",
            "availabilityImpact": "HIGH",
            "baseScore": 8.1,
            "baseSeverity": "HIGH",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "NONE",
            "privilegesRequired": "LOW",
            "scope": "UNCHANGED",
            "userInteraction": "NONE",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H",
            "version": "3.1"
          }
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-94",
              "description": "CWE-94: Improper Control of Generation of Code (\u0027Code Injection\u0027)",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-04-23T18:44:39.907Z",
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M"
      },
      "references": [
        {
          "name": "https://github.com/projectcontour/contour/security/advisories/GHSA-x4mj-7f9g-29h4",
          "tags": [
            "x_refsource_CONFIRM"
          ],
          "url": "https://github.com/projectcontour/contour/security/advisories/GHSA-x4mj-7f9g-29h4"
        },
        {
          "name": "https://github.com/projectcontour/contour/releases/tag/v1.31.6",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/projectcontour/contour/releases/tag/v1.31.6"
        },
        {
          "name": "https://github.com/projectcontour/contour/releases/tag/v1.32.5",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/projectcontour/contour/releases/tag/v1.32.5"
        },
        {
          "name": "https://github.com/projectcontour/contour/releases/tag/v1.33.4",
          "tags": [
            "x_refsource_MISC"
          ],
          "url": "https://github.com/projectcontour/contour/releases/tag/v1.33.4"
        }
      ],
      "source": {
        "advisory": "GHSA-x4mj-7f9g-29h4",
        "discovery": "UNKNOWN"
      },
      "title": "Contour: Lua code injection via Cookie Path Rewrite Policy"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "cveId": "CVE-2026-41246",
    "datePublished": "2026-04-23T18:44:39.907Z",
    "dateReserved": "2026-04-18T03:47:03.135Z",
    "dateUpdated": "2026-06-30T12:08:48.916Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-41246",
      "date": "2026-07-01",
      "epss": "0.00481",
      "percentile": "0.3799"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-41246\",\"sourceIdentifier\":\"security-advisories@github.com\",\"published\":\"2026-04-23T19:17:29.670\",\"lastModified\":\"2026-06-30T03:19:25.287\",\"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\u0027s 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\u0027s 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\u0027s own route, which they already control. However, since Envoy runs as shared infrastructure, the injected code can also read Envoy\u0027s 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\":[{\"source\":\"security-advisories@github.com\",\"affectedData\":[{\"vendor\":\"projectcontour\",\"product\":\"contour\",\"versions\":[{\"version\":\"\u003e= 1.33.0, \u003c 1.33.4\",\"status\":\"affected\"},{\"version\":\"\u003e= 1.32.0, \u003c 1.32.5\",\"status\":\"affected\"},{\"version\":\"\u003e= 1.19.0, \u003c 1.31.6\",\"status\":\"affected\"}]}]},{\"source\":\"0b0ca135-0b70-47e7-9f44-1890c2a1c46c\",\"affectedData\":[{\"vendor\":\"Red Hat\",\"product\":\"ExternalDNS Operator\",\"defaultStatus\":\"unaffected\",\"cpes\":[\"cpe:/a:redhat:ext_dns_optr:1\"]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"security-advisories@github.com\",\"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\":\"security-advisories@github.com\",\"type\":\"Primary\",\"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\":\"security-advisories@github.com\",\"tags\":[\"Release Notes\"]},{\"url\":\"https://github.com/projectcontour/contour/releases/tag/v1.32.5\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Release Notes\"]},{\"url\":\"https://github.com/projectcontour/contour/releases/tag/v1.33.4\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Release Notes\"]},{\"url\":\"https://github.com/projectcontour/contour/security/advisories/GHSA-x4mj-7f9g-29h4\",\"source\":\"security-advisories@github.com\",\"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\"}]}}",
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2026-41246\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2026-04-24T14:15:49.308320Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2026-04-24T14:15:54.593Z\"}}], \"cna\": {\"title\": \"Contour: Lua code injection via Cookie Path Rewrite Policy\", \"source\": {\"advisory\": \"GHSA-x4mj-7f9g-29h4\", \"discovery\": \"UNKNOWN\"}, \"metrics\": [{\"cvssV3_1\": {\"scope\": \"UNCHANGED\", \"version\": \"3.1\", \"baseScore\": 8.1, \"attackVector\": \"NETWORK\", \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H\", \"integrityImpact\": \"NONE\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"LOW\", \"availabilityImpact\": \"HIGH\", \"privilegesRequired\": \"LOW\", \"confidentialityImpact\": \"HIGH\"}}], \"affected\": [{\"vendor\": \"projectcontour\", \"product\": \"contour\", \"versions\": [{\"status\": \"affected\", \"version\": \"\u003e= 1.33.0, \u003c 1.33.4\"}, {\"status\": \"affected\", \"version\": \"\u003e= 1.32.0, \u003c 1.32.5\"}, {\"status\": \"affected\", \"version\": \"\u003e= 1.19.0, \u003c 1.31.6\"}]}], \"references\": [{\"url\": \"https://github.com/projectcontour/contour/security/advisories/GHSA-x4mj-7f9g-29h4\", \"name\": \"https://github.com/projectcontour/contour/security/advisories/GHSA-x4mj-7f9g-29h4\", \"tags\": [\"x_refsource_CONFIRM\"]}, {\"url\": \"https://github.com/projectcontour/contour/releases/tag/v1.31.6\", \"name\": \"https://github.com/projectcontour/contour/releases/tag/v1.31.6\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/projectcontour/contour/releases/tag/v1.32.5\", \"name\": \"https://github.com/projectcontour/contour/releases/tag/v1.32.5\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/projectcontour/contour/releases/tag/v1.33.4\", \"name\": \"https://github.com/projectcontour/contour/releases/tag/v1.33.4\", \"tags\": [\"x_refsource_MISC\"]}], \"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\u0027s 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\u0027s 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\u0027s own route, which they already control. However, since Envoy runs as shared infrastructure, the injected code can also read Envoy\u0027s 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.\"}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-94\", \"description\": \"CWE-94: Improper Control of Generation of Code (\u0027Code Injection\u0027)\"}]}], \"providerMetadata\": {\"orgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"shortName\": \"GitHub_M\", \"dateUpdated\": \"2026-04-23T18:44:39.907Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2026-41246\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-04-24T18:20:40.823Z\", \"dateReserved\": \"2026-04-18T03:47:03.135Z\", \"assignerOrgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"datePublished\": \"2026-04-23T18:44:39.907Z\", \"assignerShortName\": \"GitHub_M\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…