CVE-2026-78699 (GCVE-0-2026-78699)
Vulnerability from cvelistv5
Published
2026-08-30 15:13
Modified
2026-08-30 15:13
CWE
Summary
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. AshPostgres.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. This issue affects ash_postgres: from 0.25.0 before 2.13.0.
Impacted products
Vendor Product Version
ash-project ash_postgres Version: 0.25.0   
    cpe:2.3:a:ash-project:ash_postgres:*:*:*:*:*:*:*:*
Create a notification for this product.
   ash-project ash_postgres Version: 03510dae24020e302558ef947be7ea874a9ce756
    cpe:2.3:a:ash-project:ash_postgres:*:*:*:*:*:*:*:*
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "collectionURL": "https://repo.hex.pm",
          "cpes": [
            "cpe:2.3:a:ash-project:ash_postgres:*:*:*:*:*:*:*:*"
          ],
          "defaultStatus": "unaffected",
          "modules": [
            "\u0027Elixir.AshPostgres.MultiTenancy\u0027"
          ],
          "packageName": "ash_postgres",
          "packageURL": "pkg:hex/ash_postgres",
          "product": "ash_postgres",
          "programFiles": [
            "lib/multitenancy.ex"
          ],
          "programRoutines": [
            {
              "name": "\u0027Elixir.AshPostgres.MultiTenancy\u0027:rename_tenant/3"
            }
          ],
          "repo": "https://github.com/ash-project/ash_postgres",
          "vendor": "ash-project",
          "versions": [
            {
              "lessThan": "2.13.0",
              "status": "affected",
              "version": "0.25.0",
              "versionType": "semver"
            }
          ]
        },
        {
          "collectionURL": "https://github.com",
          "cpes": [
            "cpe:2.3:a:ash-project:ash_postgres:*:*:*:*:*:*:*:*"
          ],
          "defaultStatus": "unaffected",
          "modules": [
            "\u0027Elixir.AshPostgres.MultiTenancy\u0027"
          ],
          "packageName": "ash-project/ash_postgres",
          "packageURL": "pkg:github/ash-project/ash_postgres",
          "product": "ash_postgres",
          "programFiles": [
            "lib/multitenancy.ex"
          ],
          "programRoutines": [
            {
              "name": "\u0027Elixir.AshPostgres.MultiTenancy\u0027:rename_tenant/3"
            }
          ],
          "repo": "https://github.com/ash-project/ash_postgres",
          "vendor": "ash-project",
          "versions": [
            {
              "lessThan": "8544ab15fe45784553c2d2da8ee1a388eee0174b",
              "status": "affected",
              "version": "03510dae24020e302558ef947be7ea874a9ce756",
              "versionType": "git"
            }
          ]
        }
      ],
      "configurations": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\u003cp\u003eAn application must run ash_postgres schema-based multitenancy with a user-driven tenant rename (for example a \u003ccode\u003emanage_tenant\u003c/code\u003e update on an editable org slug or subdomain), letting a user choose a new tenant name that collides with an existing tenant\u0027s schema.\u003c/p\u003e"
            },
            {
              "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\u0027s 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\u0027s 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\u00e4nnchen / EEF"
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\u003cp\u003eUnchecked 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\u0027s schema to have their tenant record repointed at that other tenant\u0027s live schema, gaining access to its data.\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eAshPostgres.MultiTenancy.rename_tenant/3\u003c/code\u003e issues the \u003ccode\u003eALTER SCHEMA ... RENAME TO ...\u003c/code\u003e with the non-raising \u003ccode\u003eEcto.Adapters.SQL.query/2\u003c/code\u003e, discards its \u003ccode\u003e{:ok, _} | {:error, _}\u003c/code\u003e result, and unconditionally returns \u003ccode\u003e:ok\u003c/code\u003e. 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 \u003ccode\u003emanage_tenant\u003c/code\u003e 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\u0027s data.\u003c/p\u003e\n\u003cp\u003eThis issue affects ash_postgres: from 0.25.0 before 2.13.0.\u003c/p\u003e"
            },
            {
              "base64": false,
              "type": "text/markdown",
              "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\u0027s schema to have their tenant record repointed at that other tenant\u0027s live schema, gaining access to its data.\n\n`AshPostgres.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\u0027s data.\n\nThis issue affects ash_postgres: from 0.25.0 before 2.13.0."
            }
          ],
          "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\u0027s schema to have their tenant record repointed at that other tenant\u0027s 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\u0027s data.\n\nThis issue affects ash_postgres: from 0.25.0 before 2.13.0."
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-1",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs"
            }
          ]
        }
      ],
      "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": {
        "dateUpdated": "2026-08-30T15:13:23.875Z",
        "orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
        "shortName": "EEF"
      },
      "references": [
        {
          "tags": [
            "vendor-advisory",
            "related"
          ],
          "url": "https://github.com/ash-project/ash_postgres/security/advisories/GHSA-6fqq-j9c4-5766"
        },
        {
          "tags": [
            "related"
          ],
          "url": "https://cna.erlef.org/cves/CVE-2026-78699.html"
        },
        {
          "tags": [
            "related"
          ],
          "url": "https://osv.dev/vulnerability/EEF-CVE-2026-78699"
        },
        {
          "tags": [
            "patch"
          ],
          "url": "https://github.com/ash-project/ash_postgres/commit/8544ab15fe45784553c2d2da8ee1a388eee0174b"
        }
      ],
      "source": {
        "discovery": "EXTERNAL"
      },
      "title": "rename_tenant returns :ok on a failed rename, enabling cross-tenant access in AshPostgres"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
    "assignerShortName": "EEF",
    "cveId": "CVE-2026-78699",
    "datePublished": "2026-08-30T15:13:23.875Z",
    "dateReserved": "2026-08-30T06:00:01.261Z",
    "dateUpdated": "2026-08-30T15:13:23.875Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…