CVE-2026-41478
JSON

10.0critical

Saltcorn: SQL Injection via Unparameterized Sync Endpoints (maxLoadedId)

Severity
10.0critical CVSS:3.1 by GitHub_M
Exploit likelihood
0.27% (higher than 20% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-jp74-mfrx-3qvh

Description

Saltcorn is an extensible, open source, no-code database application builder. Prior to 1.4.6, 1.5.6, and 1.6.0-beta.5, a 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. This vulnerability is fixed in 1.4.6, 1.5.6, and 1.6.0-beta.5.

Affected

Product or packageVersionsReported by
saltcorn saltcorn< 1.4.6, >= 1.5.0-beta.0, < 1.5.6, >= 1.6.0-alpha.0, < 1.6.0-beta.5, before 1.4.6, from 1.5.0 before 1.5.6, 1.6.0CVE List, NVD
@saltcorn/server (npm)before 1.4.6, from 1.5.0-beta.0 before 1.5.6, from 1.6.0-alpha.0 before 1.6.0-beta.5GitHub Advisory Database

All scores

GitHub_M10.0critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
GitHub9.9critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-89

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

Saltcorn is an extensible, open source, no-code database application builder. Prior to 1.4.6, 1.5.6, and 1.6.0-beta.5, a 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. This vulnerability is fixed in 1.4.6, 1.5.6, and 1.6.0-beta.5.

GitHub Advisory Database
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
NVD (es)

Saltcorn es un constructor de aplicaciones de base de datos sin código, de código abierto y extensible. Antes de 1.4.6, 1.5.6 y 1.6.0-beta.5, una vulnerabilidad de inyección SQL en las rutas de sincronización móvil de Saltcorn permite a cualquier usuario autenticado con bajos privilegios y acceso de lectura a al menos una tabla inyectar SQL arbitrario a través de parámetros de sincronización. Esto puede llevar a la exfiltración completa de la base de datos, incluyendo hashes de contraseñas de administrador y secretos de configuración, y también puede permitir la modificación o destrucción de la base de datos dependiendo del backend. Esta vulnerabilidad está corregida en 1.4.6, 1.5.6 y 1.6.0-beta.5.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-41478 changed 2026-04-27CVE Terms of Use
GitHub Advisory DatabaseGHSA-jp74-mfrx-3qvh changed 2026-05-05CC-BY-4.0
NVDCVE-2026-41478 changed 2026-11-11Public domain