2026-08-31 3:5CVE-2026-82726EEF
PUBLISHED5.2ApplicationCWE-625CWE-178

AshPhoenix get_subdomain maps a crafted or differently-cased Host header to an arbitrary tenant

Permissive Regular Expression vulnerability in ash-project ash_phoenix lets a remote client select the tenant an Ash application uses, or degrade the request, by sending a crafted Host header.

AshPhoenix.Helpers.get_subdomain/2 stripped the root domain with String.replace(host, ~r/.?#{root_host}/, ""). The root host was interpolated raw, so each . became a wildcard and any metacharacter a pattern, and the replace was global and unanchored, so a match was removed from anywhere in the string. With root_host example.com, Host: foo.exampleXcom.attacker.net returned the tenant foo.attacker.net. A metacharacter-bearing or nil root host degraded the pattern or raised on every request. The comparison was also case-sensitive, so TENANT.EXAMPLE.COM and EXAMPLE.COM slipped past the root-host allowlist. conn.host comes from the client Host header. The fix matches the root host case-insensitively and only as an exact trailing suffix.

This issue affects ash_phoenix: from 2.1.26 before 2.3.25.

Problem type

Affected products

ash-project

ash_phoenix

< 2.3.25 - AFFECTED

ash_phoenix

< 8306f29e77526840c89f3cd244996ce7c0fa2cda - AFFECTED

References

JSON source

https://cveawg.mitre.org/api/cve/CVE-2026-82726
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2026-82726",
    "assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
    "assignerShortName": "EEF",
    "dateUpdated": "2026-08-31T03:05:38.612Z",
    "dateReserved": "2026-08-31T00:59:08.960Z",
    "datePublished": "2026-08-31T03:05:38.612Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
        "shortName": "EEF",
        "dateUpdated": "2026-08-31T03:05:38.612Z"
      },
      "title": "AshPhoenix get_subdomain maps a crafted or differently-cased Host header to an arbitrary tenant",
      "descriptions": [
        {
          "lang": "en",
          "value": "Permissive Regular Expression vulnerability in ash-project ash_phoenix lets a remote client select the tenant an Ash application uses, or degrade the request, by sending a crafted Host header.\n\nAshPhoenix.Helpers.get_subdomain/2 stripped the root domain with String.replace(host, ~r/.?#{root_host}/, \"\"). The root host was interpolated raw, so each . became a wildcard and any metacharacter a pattern, and the replace was global and unanchored, so a match was removed from anywhere in the string. With root_host example.com, Host: foo.exampleXcom.attacker.net returned the tenant foo.attacker.net. A metacharacter-bearing or nil root host degraded the pattern or raised on every request. The comparison was also case-sensitive, so TENANT.EXAMPLE.COM and EXAMPLE.COM slipped past the root-host allowlist. conn.host comes from the client Host header. The fix matches the root host case-insensitively and only as an exact trailing suffix.\n\nThis issue affects ash_phoenix: from 2.1.26 before 2.3.25.",
          "supportingMedia": [
            {
              "type": "text/html",
              "base64": false,
              "value": "<p>Permissive Regular Expression vulnerability in ash-project ash_phoenix lets a remote client select the tenant an Ash application uses, or degrade the request, by sending a crafted <code>Host</code> header.</p>\n<p><code>AshPhoenix.Helpers.get_subdomain/2</code> stripped the root domain with <code>String.replace(host, ~r/.?#{root_host}/, \"\")</code>. The root host was interpolated raw, so each <code>.</code> became a wildcard and any metacharacter a pattern, and the replace was global and unanchored, so a match was removed from anywhere in the string. With <code>root_host</code> <code>example.com</code>, <code>Host: foo.exampleXcom.attacker.net</code> returned the tenant <code>foo.attacker.net</code>. A metacharacter-bearing or <code>nil</code> root host degraded the pattern or raised on every request. The comparison was also case-sensitive, so <code>TENANT.EXAMPLE.COM</code> and <code>EXAMPLE.COM</code> slipped past the root-host allowlist. <code>conn.host</code> comes from the client <code>Host</code> header. The fix matches the root host case-insensitively and only as an exact trailing suffix.</p>\n<p>This issue affects ash_phoenix: from 2.1.26 before 2.3.25.</p>"
            },
            {
              "type": "text/markdown",
              "base64": false,
              "value": "Permissive Regular Expression vulnerability in ash-project ash_phoenix lets a remote client select the tenant an Ash application uses, or degrade the request, by sending a crafted `Host` header.\n\n`AshPhoenix.Helpers.get_subdomain/2` stripped the root domain with `String.replace(host, ~r/.?#{root_host}/, \"\")`. The root host was interpolated raw, so each `.` became a wildcard and any metacharacter a pattern, and the replace was global and unanchored, so a match was removed from anywhere in the string. With `root_host` `example.com`, `Host: foo.exampleXcom.attacker.net` returned the tenant `foo.attacker.net`. A metacharacter-bearing or `nil` root host degraded the pattern or raised on every request. The comparison was also case-sensitive, so `TENANT.EXAMPLE.COM` and `EXAMPLE.COM` slipped past the root-host allowlist. `conn.host` comes from the client `Host` header. The fix matches the root host case-insensitively and only as an exact trailing suffix.\n\nThis issue affects ash_phoenix: from 2.1.26 before 2.3.25."
            }
          ]
        }
      ],
      "affected": [
        {
          "vendor": "ash-project",
          "product": "ash_phoenix",
          "collectionURL": "https://repo.hex.pm",
          "packageName": "ash_phoenix",
          "cpes": [
            "cpe:2.3:a:ash-project:ash_phoenix:*:*:*:*:*:*:*:*"
          ],
          "modules": [
            "'Elixir.AshPhoenix.Helpers'"
          ],
          "programFiles": [
            "lib/ash_phoenix/helpers.ex"
          ],
          "programRoutines": [
            {
              "name": "'Elixir.AshPhoenix.Helpers':get_subdomain/2"
            }
          ],
          "repo": "https://github.com/ash-project/ash_phoenix",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "2.1.26",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "2.3.25"
            }
          ]
        },
        {
          "vendor": "ash-project",
          "product": "ash_phoenix",
          "collectionURL": "https://github.com",
          "packageName": "ash-project/ash_phoenix",
          "cpes": [
            "cpe:2.3:a:ash-project:ash_phoenix:*:*:*:*:*:*:*:*"
          ],
          "modules": [
            "'Elixir.AshPhoenix.Helpers'"
          ],
          "programFiles": [
            "lib/ash_phoenix/helpers.ex"
          ],
          "programRoutines": [
            {
              "name": "'Elixir.AshPhoenix.Helpers':get_subdomain/2"
            }
          ],
          "repo": "https://github.com/ash-project/ash_phoenix",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "9a5ea4d377bc263de321d79574872a3dfc4fb541",
              "status": "affected",
              "versionType": "git",
              "lessThan": "8306f29e77526840c89f3cd244996ce7c0fa2cda"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-625 Permissive Regular Expression",
              "cweId": "CWE-625",
              "type": "CWE"
            }
          ]
        },
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-178 Improper Handling of Case Sensitivity",
              "cweId": "CWE-178",
              "type": "CWE"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://github.com/ash-project/ash_phoenix/security/advisories/GHSA-rpf8-q9jh-qxrr",
          "tags": [
            "vendor-advisory",
            "related"
          ]
        },
        {
          "url": "https://cna.erlef.org/cves/CVE-2026-82726.html",
          "tags": [
            "related"
          ]
        },
        {
          "url": "https://osv.dev/vulnerability/EEF-CVE-2026-82726",
          "tags": [
            "related"
          ]
        },
        {
          "url": "https://github.com/ash-project/ash_phoenix/commit/8306f29e77526840c89f3cd244996ce7c0fa2cda",
          "tags": [
            "patch"
          ]
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-153",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-153 Input Data Manipulation"
            }
          ]
        }
      ],
      "metrics": [
        {
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "configurations": [
        {
          "lang": "en",
          "value": "The application uses subdomain-based multitenancy via AshPhoenix.Helpers.get_subdomain/2 (for example through AshPhoenix.LiveView.SubdomainHook) to select the tenant from the request host.",
          "supportingMedia": [
            {
              "type": "text/html",
              "base64": false,
              "value": "<p>The application uses subdomain-based multitenancy via <code>AshPhoenix.Helpers.get_subdomain/2</code> (for example through <code>AshPhoenix.LiveView.SubdomainHook</code>) to select the tenant from the request host.</p>"
            },
            {
              "type": "text/markdown",
              "base64": false,
              "value": "The application uses subdomain-based multitenancy via `AshPhoenix.Helpers.get_subdomain/2` (for example through `AshPhoenix.LiveView.SubdomainHook`) to select the tenant from the request host."
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "value": "Peter Ullrich",
          "type": "finder"
        },
        {
          "lang": "en",
          "value": "Peter Ullrich",
          "type": "reporter"
        },
        {
          "lang": "en",
          "value": "Zach Daniel / Ash Project",
          "type": "remediation developer"
        },
        {
          "lang": "en",
          "value": "Jonatan Männchen / EEF",
          "type": "coordinator"
        }
      ]
    }
  }
}