Vulnerability library
Security checkMarch 20, 2026

SQL Injection via unsanitized JSON path keys when ignoring/silencing compilation errors or using `Kysely<any>`.

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

High severitynpmkysely

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

Kysely through 0.28.11 has a SQL injection vulnerability in JSON path compilation for MySQL and SQLite dialects. The visitJSONPathLeg() function appends user-controlled values from .key() and .at() directly into single-quoted JSON path string literals ('$.key') without escaping single quotes.

Recommendation

Update the kysely package to the latest compatible version. Followings are version details:

  • Affected version(s): >= 0.26.0, <= 0.28.11
  • Patched version(s): 0.28.12

References

Could your website be exposed too?

SmartScanner can check your website for SQL Injection via unsanitized JSON path keys when ignoring/silencing compilation errors or using `Kysely<any>`. and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated March 20, 2026