Vulnerability library
Security checkApril 10, 2026

@saltcorn/data vulnerable to SQL Injection via jsexprToSQL Literal Handler

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Low severitynpm@saltcorn/data

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

The jsexprToSQL() function in Saltcorn converts JavaScript expressions to SQL for use in database constraints. The Literal handler wraps string values in single quotes without escaping embedded single quotes, allowing SQL injection when creating Formula-type table constraints.

Recommendation

Update the @saltcorn/data package to the latest compatible version. Followings are version details:

  • Affected version(s): **>= 1.6.0-alpha.0, < 1.6.0-beta.4 >= 1.5.0, < 1.5.5 < 1.4.5**
  • Patched version(s): **1.6.0-beta.4 1.5.5 1.4.5**

References

Could your website be exposed too?

SmartScanner can check your website for @saltcorn/data vulnerable to SQL Injection via jsexprToSQL Literal Handler and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated April 10, 2026