Vulnerabilities in pkg:npm/@saltcorn/data
PACKAGEGHSA-9237-rg5p-rhfw is a HIGH tenant user role is used vulnerability (CWE-863: Incorrect Authorization) affecting @saltcorn/data libraries in the npm ecosystem. The issue involves tenant user role is used for tenant creation role check. Remediation is available by upgrading affected packages to version 1.4.4, 1.5.2, 1.6.0-beta.2.
pkg:npm/@saltcorn/data
Vulnerability advisories affecting package pkg:npm/@saltcorn/data. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-9237-rg5p-rhfw | - | HIGH | @saltcorn/data: Tenant user role is used for tenant creation role check |
| GHSA-59xv-588h-2vmm | - | LOW | @saltcorn/data vulnerable to SQL Injection via jsexprToSQL Literal Handler |
GHSA-9237-rg5p-rhfw at a Glance
How to Fix GHSA-9237-rg5p-rhfw
To remediate this vulnerability, upgrade all affected @saltcorn/data dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @saltcorn/data@1.4.4
npm install @saltcorn/data@1.5.2
npm install @saltcorn/data@1.6.0-beta.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @saltcorn/data
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-9237-rg5p-rhfw, inspect your project dependencies using npm:
npm ls @saltcorn/data
Analyze the terminal output to locate any version of @saltcorn/data in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.4), your application is affected.
Note: The npm ls @saltcorn/data command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In @saltcorn/data, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-9237-rg5p-rhfw Affected @saltcorn/data Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@saltcorn/data
|
npm |
< 1.4.4
|
1.4.4
|
|
@saltcorn/data
|
npm |
≥ 1.5.0-beta.0
< 1.5.2
|
1.5.2
|
|
@saltcorn/data
|
npm |
≥ 1.6.0-alpha.0
< 1.6.0-beta.2
|
1.6.0-beta.2
|
References
Frequently Asked Questions
What is GHSA-9237-rg5p-rhfw?
Which @saltcorn/data versions are affected?
What version fixes GHSA-9237-rg5p-rhfw?
Is @saltcorn/data affected?
What CWE is associated with GHSA-9237-rg5p-rhfw?
How can I check npm dependencies for GHSA-9237-rg5p-rhfw?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9237-rg5p-rhfw",
"modified" : "2026-04-22T14:31:34Z",
"published" : "2026-04-22T14:31:34Z",
"aliases" : [ ],
"summary" : "@saltcorn/data: Tenant user role is used for tenant creation role check",
"details" : "## 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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@saltcorn/data"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@saltcorn/data"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.5.0-beta.0"
}, {
"fixed" : "1.5.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@saltcorn/data"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.6.0-alpha.0"
}, {
"fixed" : "1.6.0-beta.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/saltcorn/saltcorn/security/advisories/GHSA-9237-rg5p-rhfw"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/saltcorn/saltcorn"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-22T14:31:34Z",
"nvd_published_at" : null
}
}