{"id":"CVE-2026-78699","state":"PUBLISHED","title":"rename_tenant returns :ok on a failed rename, enabling cross-tenant access in AshPostgres","description":"Unchecked Return Value vulnerability in ash-project ash_postgres allows a user who can drive a tenant rename to a name that collides with an existing tenant's schema to have their tenant record repointed at that other tenant's live schema, gaining access to its data.\n\nAshPostgres.MultiTenancy.rename_tenant/3 issues the ALTER SCHEMA ... RENAME TO ... with the non-raising Ecto.Adapters.SQL.query/2, discards its {:ok, _} | {:error, _} result, and unconditionally returns :ok. PostgreSQL rejects the rename when the target schema already exists (and on insufficient privilege or lock timeout), but that failure never reaches the caller. The calling manage_tenant update action therefore sees success and commits the tenant row with the new name, which is the schema of a different existing tenant, so subsequent reads and writes for that tenant run against the other tenant's data.\n\nThis issue affects ash_postgres: from 0.25.0 before 2.13.0.","publishedAt":"2026-08-30T15:13:23.875Z","updatedAt":"2026-09-01T12:30:30.395Z","severity":{"score":7.2,"label":"High","version":"4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","source":"EEF"},"assigner":"EEF","products":["ash-project ash_postgres"],"affected":[{"vendor":"ash-project","product":"ash_postgres","packageName":"ash_postgres","packageURL":"pkg:hex/ash_postgres","defaultStatus":"unaffected","versions":[{"version":"0.25.0","status":"affected","lessThan":"2.13.0","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:ash-project:ash_postgres:*:*:*:*:*:*:*:*"],"modules":["'Elixir.AshPostgres.MultiTenancy'"],"programFiles":["lib/multitenancy.ex"],"programRoutines":[{"name":"'Elixir.AshPostgres.MultiTenancy':rename_tenant/3"}],"repo":"https://github.com/ash-project/ash_postgres"},{"vendor":"ash-project","product":"ash_postgres","packageName":"ash-project/ash_postgres","packageURL":"pkg:github/ash-project/ash_postgres","defaultStatus":"unaffected","versions":[{"version":"03510dae24020e302558ef947be7ea874a9ce756","status":"affected","lessThan":"8544ab15fe45784553c2d2da8ee1a388eee0174b","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:ash-project:ash_postgres:*:*:*:*:*:*:*:*"],"modules":["'Elixir.AshPostgres.MultiTenancy'"],"programFiles":["lib/multitenancy.ex"],"programRoutines":[{"name":"'Elixir.AshPostgres.MultiTenancy':rename_tenant/3"}],"repo":"https://github.com/ash-project/ash_postgres"}],"references":["https://github.com/ash-project/ash_postgres/security/advisories/GHSA-6fqq-j9c4-5766","https://cna.erlef.org/cves/CVE-2026-78699.html","https://osv.dev/vulnerability/EEF-CVE-2026-78699","https://github.com/ash-project/ash_postgres/commit/8544ab15fe45784553c2d2da8ee1a388eee0174b"],"weaknesses":["CWE-252"],"ingestedAt":"2026-10-29T20:13:07.220Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/78xxx/CVE-2026-78699.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-78699","state":"PUBLISHED","datePublished":"2026-08-30T15:13:23.875Z","dateUpdated":"2026-09-01T12:30:30.395Z","assignerShortName":"EEF","assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateReserved":"2026-08-30T06:00:01.261Z"},"containers":{"cna":{"title":"rename_tenant returns :ok on a failed rename, enabling cross-tenant access in AshPostgres","descriptions":[{"lang":"en","value":"Unchecked Return Value vulnerability in ash-project ash_postgres allows a user who can drive a tenant rename to a name that collides with an existing tenant's schema to have their tenant record repointed at that other tenant's live schema, gaining access to its data.\n\nAshPostgres.MultiTenancy.rename_tenant/3 issues the ALTER SCHEMA ... RENAME TO ... with the non-raising Ecto.Adapters.SQL.query/2, discards its {:ok, _} | {:error, _} result, and unconditionally returns :ok. PostgreSQL rejects the rename when the target schema already exists (and on insufficient privilege or lock timeout), but that failure never reaches the caller. The calling manage_tenant update action therefore sees success and commits the tenant row with the new name, which is the schema of a different existing tenant, so subsequent reads and writes for that tenant run against the other tenant's data.\n\nThis issue affects ash_postgres: from 0.25.0 before 2.13.0."}],"affected":[{"vendor":"ash-project","product":"ash_postgres","packageName":"ash_postgres","packageURL":"pkg:hex/ash_postgres","defaultStatus":"unaffected","versions":[{"version":"0.25.0","status":"affected","lessThan":"2.13.0","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:ash-project:ash_postgres:*:*:*:*:*:*:*:*"],"modules":["'Elixir.AshPostgres.MultiTenancy'"],"programFiles":["lib/multitenancy.ex"],"programRoutines":[{"name":"'Elixir.AshPostgres.MultiTenancy':rename_tenant/3"}],"repo":"https://github.com/ash-project/ash_postgres"},{"vendor":"ash-project","product":"ash_postgres","packageName":"ash-project/ash_postgres","packageURL":"pkg:github/ash-project/ash_postgres","defaultStatus":"unaffected","versions":[{"version":"03510dae24020e302558ef947be7ea874a9ce756","status":"affected","lessThan":"8544ab15fe45784553c2d2da8ee1a388eee0174b","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:ash-project:ash_postgres:*:*:*:*:*:*:*:*"],"modules":["'Elixir.AshPostgres.MultiTenancy'"],"programFiles":["lib/multitenancy.ex"],"programRoutines":[{"name":"'Elixir.AshPostgres.MultiTenancy':rename_tenant/3"}],"repo":"https://github.com/ash-project/ash_postgres"}],"references":[{"url":"https://github.com/ash-project/ash_postgres/security/advisories/GHSA-6fqq-j9c4-5766","tags":["vendor-advisory","related"]},{"url":"https://cna.erlef.org/cves/CVE-2026-78699.html","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-78699","tags":["related"]},{"url":"https://github.com/ash-project/ash_postgres/commit/8544ab15fe45784553c2d2da8ee1a388eee0174b","tags":["patch"]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"LOCAL","baseScore":7.2,"baseSeverity":"HIGH","privilegesRequired":"LOW","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-252","description":"CWE-252 Unchecked Return Value","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"EEF","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateUpdated":"2026-08-30T15:13:23.875Z"},"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>An application must run ash_postgres schema-based multitenancy with a user-driven tenant rename (for example a <code>manage_tenant</code> update on an editable org slug or subdomain), letting a user choose a new tenant name that collides with an existing tenant's schema.</p>"},{"base64":false,"type":"text/markdown","value":"An application must run ash_postgres schema-based multitenancy with a user-driven tenant rename (for example a `manage_tenant` update on an editable org slug or subdomain), letting a user choose a new tenant name that collides with an existing tenant's schema."}],"value":"An application must run ash_postgres schema-based multitenancy with a user-driven tenant rename (for example a manage_tenant update on an editable org slug or subdomain), letting a user choose a new tenant name that collides with an existing tenant's schema."}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:ash-project:ash_postgres:*:*:*:*:*:*:*:*","versionEndExcluding":"2.13.0","versionStartIncluding":"0.25.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Peter Ullrich"},{"lang":"en","type":"reporter","value":"Peter Ullrich"},{"lang":"en","type":"remediation developer","value":"Zach Daniel / Ash Project"},{"lang":"en","type":"coordinator","value":"Jonatan Männchen / EEF"}],"impacts":[{"capecId":"CAPEC-1","descriptions":[{"lang":"en","value":"CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs"}]}],"source":{"discovery":"EXTERNAL"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/ash-project/ash_postgres/security/advisories/GHSA-6fqq-j9c4-5766","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-09-01T12:30:06.722608Z","id":"CVE-2026-78699","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-09-01T12:30:30.395Z"}}]}}}