Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm

GHSA-jp74-mfrx-3qvh

CRITICAL

GHSA-jp74-mfrx-3qvh is a critical-severity (CVSS 9.9) vulnerability in @saltcorn/server. O3 Security confirms whether GHSA-jp74-mfrx-3qvh is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Saltcorn: SQL Injection via Unparameterized Sync Endpoints (maxLoadedId)

Also known asCVE-2026-41478
Published
Apr 16, 2026
Updated
May 5, 2026
Affected
3 pkgs
Patched
3 / 3
Exploits
None indexed

Real-World Exposure

3 pkgs affected
📦@saltcorn/server📦@saltcorn/server📦@saltcorn/server

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.

Description

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.jsgetSyncRows()
    • branch using where data_tbl."${db.sqlsanitize(pkName)}" > ${syncInfo.maxLoadedId}
    • branch using and info_tbl.ref > ${syncInfo.maxLoadedId}
  • packages/server/routes/sync.jsgetDelRows()
    • 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

Affected Packages

3 total 3 fixed
EcosystemPackageVulnerable rangeFix
📦npm@saltcorn/serverall versions1.4.6
📦npm@saltcorn/server1.5.0-beta.0&&< 1.5.61.5.6
📦npm@saltcorn/server1.6.0-alpha.0&&< 1.6.0-beta.51.6.0-beta.5

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @saltcorn/server. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update @saltcorn/server to 1.4.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-jp74-mfrx-3qvh is resolved across your whole dependency graph.

  3. 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.

  4. How O3 protects you

    O3 pinpoints whether GHSA-jp74-mfrx-3qvh is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-jp74-mfrx-3qvh. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### 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
O3 Security · Impact-Aware SCA

Is GHSA-jp74-mfrx-3qvh in your dependencies?

O3 detects GHSA-jp74-mfrx-3qvh across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.