GHSA-9237-rg5p-rhfw — @saltcorn/data
GHSA-9237-rg5p-rhfw is a security vulnerability in @saltcorn/data. A fix is available for @saltcorn/data — see the affected versions and patch details below.
@saltcorn/data: Tenant user role is used for tenant creation role check
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@saltcorn/datanpmDescription
Summary
When 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.
If the same logic applies to other routes, a tenant admin effectively gains admin rights on the root domain.
PoC
A tenant-created subtenant appears under the Saltcorn public schema instead of the tenant's own schema.
- Even when
role_id=1is required for tenant creation on saltcorn.com (only admin can create tenants), existing tenant admins can still create new tenants because their localrole_id:1is evaluated against the root domain. - Even when
role_to_create_tenantis set to0in the tenant's_sc_configschema, or removed entirely, the tenant admin can still create sub-tenants on the root domain — suggestingrole_to_create_tenantis not being read at all.
Impact
Tenant 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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @saltcorn/data | all versions | 1.4.4npm install @saltcorn/data@1.4.4 |
| 📦npm | @saltcorn/data | ≥ 1.5.0-beta.0&&< 1.5.2 | 1.5.2npm install @saltcorn/data@1.5.2 |
| 📦npm | @saltcorn/data | ≥ 1.6.0-alpha.0&&< 1.6.0-beta.2 | 1.6.0-beta.2npm install @saltcorn/data@1.6.0-beta.2 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @saltcorn/data, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @saltcorn/data to 1.4.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-9237-rg5p-rhfw is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-9237-rg5p-rhfw can be triaged on real exposure rather than presence alone.
Tailored to GHSA-9237-rg5p-rhfw. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-9237-rg5p-rhfw in your dependencies?
O3 Security finds GHSA-9237-rg5p-rhfw across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.