# Saltcorn @saltcorn/data SQL injection in jsexprToSQL Literal Handler

Source: https://junglewise.ai/threats/saltcorn-saltcorn-data-sql-injection-in-jsexprtosql-literal-handler-bdaf86bc  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-10. Updated: 2026-05-10  
License: CC BY 4.0 with a link back

Severity: low · CVSS 0 · Published 2026-04-10

Saltcorn is an open-source no-code platform used to build web applications and databases. A security flaw in how it handles database constraints allows an administrative user to execute unauthorized database commands. This could lead to the deletion of tables, theft of sensitive user data, or full control over the underlying database.

Technologies: [Saltcorn](https://junglewise.ai/threats/technologies/saltcorn). Vendors: [Saltcorn](https://junglewise.ai/threats/vendors/saltcorn).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Low severity, with a CVSS score of 0, published 10 April 2026.

**Which products and versions are affected?** Saltcorn < 1.4.5, >= 1.5.0 < 1.5.5, >= 1.6.0-alpha.0 < 1.6.0-beta.4.

**Is there a fix for This vulnerability?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run Saltcorn at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A SQL injection vulnerability exists in the `jsexprToSQL()` function within `@saltcorn/data`. The `Literal` handler in `packages/saltcorn-data/models/expression.ts` fails to escape single quotes when converting JavaScript string literals into SQL for database CHECK constraints. An attacker with sufficient privileges to create or modify table constraints can provide a crafted JavaScript expression (e.g., using a payload like `'; DROP TABLE users; --`) that breaks out of the SQL string context. This results in arbitrary SQL execution during the `ALTER TABLE` operation. The issue is fixed in versions 1.4.5, 1.5.5, and 1.6.0-beta.4.

## Affected products

- Saltcorn @saltcorn/data < 1.4.5, >= 1.5.0 < 1.5.5, >= 1.6.0-alpha.0 < 1.6.0-beta.4

## Timeline

- 2026-04-09: disclosed: Vulnerability reported to Saltcorn maintainers.
- 2026-04-10: advisory: GitHub Advisory GHSA-59xv-588h-2vmm published.

## References

- [https://api.github.com/users/zulloper](https://api.github.com/users/zulloper)
- [https://github.com/zulloper](https://github.com/zulloper)
- [https://api.github.com/users/zulloper/gists%7B/gist_id%7D](https://api.github.com/users/zulloper/gists%7B/gist_id%7D)
- [https://api.github.com/users/zulloper/repos](https://api.github.com/users/zulloper/repos)
- [https://avatars.githubusercontent.com/u/47581381?v=4](https://avatars.githubusercontent.com/u/47581381?v=4)
- [https://api.github.com/users/zulloper/events%7B/privacy%7D](https://api.github.com/users/zulloper/events%7B/privacy%7D)

## Related threats

- [Saltcorn: SQL Injection via Unparameterized Sync Endpoints (maxLoadedId)](https://junglewise.ai/threats/cve-2026-41478-saltcorn-sql-injection-via-unparameterized-sync-endpoints)
- [Saltcorn open redirect in login via backslash bypass](https://junglewise.ai/threats/cve-2026-42259-saltcorn-open-redirect-in-login-via-backslash-bypass)
- [Saltcorn path traversal in mobile sync endpoints](https://junglewise.ai/threats/cve-2026-40163-saltcorn-path-traversal-in-mobile-sync-endpoints)
- [Saltcorn reflected XSS and command injection chaining for RCE](https://junglewise.ai/threats/saltcorn-reflected-xss-and-command-injection-chaining-for-rce-91ca3009)
- [Saltcorn Server path traversal in sync endpoint](https://junglewise.ai/threats/cve-2024-47818-saltcorn-server-path-traversal-in-sync-endpoint)
