CVE-2026-41478: Saltcorn SQL Injection Vulnerability
CRITICALCVE-2026-41478 is a CRITICAL (CVSS 9.9) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Saltcorn libraries in the npm ecosystem. The issue involves sql injection via unparameterized sync endpoints (maxloadedid). Remediation is available by upgrading affected packages to version 1.4.6, 1.5.6, 1.6.0-beta.5.
CVE-2026-41478 at a Glance
Security Impact
CVSS: 9.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2026-41478
To remediate this vulnerability, upgrade all affected Saltcorn 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/server@1.4.6
npm install @saltcorn/server@1.5.6
npm install @saltcorn/server@1.6.0-beta.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @saltcorn/server
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-41478, inspect your project dependencies using npm:
npm ls @saltcorn/server
Analyze the terminal output to locate any version of Saltcorn in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.6), your application is affected.
Note: The npm ls @saltcorn/server 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-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Saltcorn, 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
CVE-2026-41478 Affected Saltcorn Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@saltcorn/server
|
npm |
< 1.4.6
|
1.4.6
|
|
@saltcorn/server
|
npm |
≥ 1.5.0-beta.0
< 1.5.6
|
1.5.6
|
|
@saltcorn/server
|
npm |
≥ 1.6.0-alpha.0
< 1.6.0-beta.5
|
1.6.0-beta.5
|
References
Frequently Asked Questions
What is CVE-2026-41478?
Which Saltcorn versions are affected?
What version fixes CVE-2026-41478?
Is @saltcorn/server affected?
What is the CVSS score of CVE-2026-41478?
What CWE is associated with CVE-2026-41478?
How can I check npm dependencies for CVE-2026-41478?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jp74-mfrx-3qvh",
"modified" : "2026-04-27T16:20:03Z",
"published" : "2026-04-16T22:51:43Z",
"aliases" : [ "CVE-2026-41478" ],
"summary" : "Saltcorn: SQL Injection via Unparameterized Sync Endpoints (maxLoadedId)",
"details" : "### Summary\nA critical SQL injection vulnerability in Saltcorn’s mobile-sync routes allows any authenticated low-privilege user with read access to at least one table to inject arbitrary SQL through sync parameters. This can lead to full database exfiltration, including admin password hashes and configuration secrets, and may also enable database modification or destruction depending on the backend. \n\n### Details\nThe issue affects the mobile-sync endpoints:\n\n- `POST /sync/load_changes`\n- `POST /sync/deletes`\n\nAccording to the provided analysis, user-controlled values from the request body are interpolated directly into SQL template literals without parameterization, type enforcement, or sanitization. In particular, `req.body.syncInfos[tableName].maxLoadedId` is embedded into SQL in `getSyncRows()` and timestamp-derived values are similarly interpolated in `getDelRows()`. \n\nRelevant vulnerable code paths include:\n\n- `packages/server/routes/sync.js` — `getSyncRows()`\n - branch using `where data_tbl.\"${db.sqlsanitize(pkName)}\" > ${syncInfo.maxLoadedId}`\n - branch using `and info_tbl.ref > ${syncInfo.maxLoadedId}`\n- `packages/server/routes/sync.js` — `getDelRows()`\n - timestamp expressions built from request-controlled values and inserted into SQL\n- `packages/server/routes/sync.js` — `/load_changes` route handler\n - request body fields are passed into the SQL-building functions without validation or safe binding\n\nThe root cause is that values are treated as trusted SQL fragments rather than bound parameters. While `db.sqlsanitize()` is used for identifiers elsewhere, that does not protect interpolated values and is not intended to prevent value-based SQL injection. The report notes there is no `parseInt()`, numeric validation, or prepared-statement binding before these values are concatenated into the query string. \n\nThis means a normal authenticated user can escape the intended query logic and execute arbitrary SQL in the context of the application database. The provided evidence demonstrates successful extraction of user records and schema information through the vulnerable sync route, confirming that the injection is practically exploitable. \n\n### PoC\nBased on the provided report, the issue can be reproduced by authenticating as a normal user, sending a crafted request to the affected sync endpoint, and placing a malicious SQL expression into the sync metadata field that is later interpolated into the backend query. Successful exploitation returns attacker-selected database contents in the sync response. \n\n### Impact\n- **Type:** SQL injection\n- **Who is impacted:** Any Saltcorn deployment exposing the affected mobile-sync routes to authenticated users\n- **Security impact:** An authenticated low-privilege user may exfiltrate the full database, including password hashes, configuration secrets, application data, and schema information; on some backends, the same flaw may also permit writes, schema changes, or destructive operations\n- **Attack preconditions:** The attacker needs a valid authenticated account with access to at least one readable table through the sync feature\n- **Privilege impact:** The issue allows escalation from normal user access to database-wide compromise",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@saltcorn/server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@saltcorn/server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.5.0-beta.0"
}, {
"fixed" : "1.5.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@saltcorn/server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.6.0-alpha.0"
}, {
"fixed" : "1.6.0-beta.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/saltcorn/saltcorn/security/advisories/GHSA-jp74-mfrx-3qvh"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41478"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/saltcorn/saltcorn"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-16T22:51:43Z",
"nvd_published_at" : "2026-04-24T21:16:19Z"
}
}