Loading...
Skip to main content

CVE-2026-41478 — Vulnerability in @saltcorn/server — CVE Details

CRITICAL

Saltcorn: SQL Injection via Unparameterized Sync Endpoints (maxLoadedId)

Published April 16, 2026Updated May 5, 2026Source: osv

Summary

### Summary A 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. ### Details The issue affects the mobile-sync endpoints: - `POST /sync/load_changes` - `POST /sync/deletes` According 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()`. Relevant vulnerable code paths include: - `packages/server/routes/sync.js` — `getSyncRows()` - branch using `where data_tbl."${db.sqlsanitize(pkName)}" > ${syncInfo.maxLoadedId}` - branch using `and info_tbl.ref > ${syncInfo.maxLoadedId}` - `packages/server/routes/sync.js` — `getDelRows()` - timestamp expressions built from request-controlled values and inserted into SQL - `packages/server/routes/sync.js` — `/load_changes` route handler - request body fields are passed into the SQL-building functions without validation or safe binding The 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. This 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. ### PoC Based 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. ### Impact - **Type:** SQL injection - **Who is impacted:** Any Saltcorn deployment exposing the affected mobile-sync routes to authenticated users - **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 - **Attack preconditions:** The attacker needs a valid authenticated account with access to at least one readable table through the sync feature - **Privilege impact:** The issue allows escalation from normal user access to database-wide compromise

Advisory Timeline

  • First published April 16, 2026 (179 days ago).
  • Last revised May 5, 2026 — 19 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update @saltcorn/server to 1.6.0-beta.5 or later
npm install @saltcorn/server@1.6.0-beta.5
npm
Update @saltcorn/server to 1.5.6 or later
npm install @saltcorn/server@1.5.6
npm
Update @saltcorn/server to 1.4.6 or later
npm install @saltcorn/server@1.4.6

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (3)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
@saltcorn/server
npm
All versions1.6.0-beta.5
@saltcorn/server
npm
All versions1.5.6
@saltcorn/server
npm
All versions1.4.6

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.9 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-41478?
Saltcorn: SQL Injection via Unparameterized Sync Endpoints (maxLoadedId) This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.9/10).
How do I check if my project is affected by CVE-2026-41478?
CVE-2026-41478 affects @saltcorn/server. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-41478 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.9

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-jp74-mfrx-3qvh

Related CVEs

  • CVE-2026-107722
    CRITICAL

    fast-jwt: Incomplete patch of CVE-2026-34950: Non-whitespace key-prefix re-enables RSA→HS256 algorithm confusion

  • CVE-2026-108261
    CRITICAL

    TinaCMS admin preview iframe loads an attacker-controlled origin from the URL fragment

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies