{"url":"http://public2.vulnerablecode.io/api/packages/1024033?format=json","purl":"pkg:npm/%40saltcorn/data@1.5.0-beta.18","type":"npm","namespace":"@saltcorn","name":"data","version":"1.5.0-beta.18","qualifiers":{},"subpath":"","is_vulnerable":true,"next_non_vulnerable_version":"1.5.5","latest_non_vulnerable_version":"1.6.0-beta.4","affected_by_vulnerabilities":[{"url":"http://public2.vulnerablecode.io/api/vulnerabilities/359794?format=json","vulnerability_id":"VCID-jm4q-bzn7-c7dz","summary":"@saltcorn/data: Tenant user role is used for tenant creation role check\n## Summary\n\nWhen a tenant admin is logged out of the root domain (e.g., saltcorn.com) but logged in to their own tenant space as admin, they can simply append `/tenant/create` to their tenant URL. The system reads the role from the tenant context (admin), and a new tenant is created on the **root domain** (in `PUBLIC SCHEMA > _sc_tenants`), rather than in the tenant's own `_sc_tenants` table.\n\nIf the same logic applies to other routes, a tenant admin effectively gains admin rights on the root domain.\n\n## PoC\n\nA tenant-created subtenant appears under the Saltcorn public schema instead of the tenant's own schema.\n\n- Even when `role_id=1` is required for tenant creation on saltcorn.com (only admin can create tenants), existing tenant admins can still create new tenants because their local `role_id:1` is evaluated against the root domain.\n- Even when `role_to_create_tenant` is set to `0` in the tenant's `_sc_config` schema, or removed entirely, the tenant admin can still create sub-tenants on the root domain — suggesting `role_to_create_tenant` is not being read at all.\n\n## Impact\n\nTenant admins gain unauthorized admin-level access to the root domain. Any authenticated tenant admin can perform privileged operations (e.g., creating tenants) on the root domain by exploiting the role context mismatch.","references":[{"reference_url":"https://github.com/saltcorn/saltcorn","reference_id":"","reference_type":"","scores":[{"value":"8.7","scoring_system":"cvssv4","scoring_elements":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N"},{"value":"HIGH","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/saltcorn/saltcorn"},{"reference_url":"https://github.com/saltcorn/saltcorn/security/advisories/GHSA-9237-rg5p-rhfw","reference_id":"","reference_type":"","scores":[{"value":"8.7","scoring_system":"cvssv4","scoring_elements":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N"},{"value":"HIGH","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/saltcorn/saltcorn/security/advisories/GHSA-9237-rg5p-rhfw"},{"reference_url":"https://github.com/advisories/GHSA-9237-rg5p-rhfw","reference_id":"GHSA-9237-rg5p-rhfw","reference_type":"","scores":[],"url":"https://github.com/advisories/GHSA-9237-rg5p-rhfw"}],"fixed_packages":[{"url":"http://public2.vulnerablecode.io/api/packages/373517?format=json","purl":"pkg:npm/%40saltcorn/data@1.5.2","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-fzrj-qs8e-m7a5"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/%2540saltcorn/data@1.5.2"},{"url":"http://public2.vulnerablecode.io/api/packages/373518?format=json","purl":"pkg:npm/%40saltcorn/data@1.6.0-beta.2","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-fzrj-qs8e-m7a5"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/%2540saltcorn/data@1.6.0-beta.2"}],"aliases":["GHSA-9237-rg5p-rhfw"],"risk_score":null,"exploitability":null,"weighted_severity":null,"resource_url":"http://public2.vulnerablecode.io/vulnerabilities/VCID-jm4q-bzn7-c7dz"}],"fixing_vulnerabilities":[],"risk_score":null,"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/%2540saltcorn/data@1.5.0-beta.18"}