Vulnerability
CVE-2026-32763
Kysely is a type-safe TypeScript SQL query builder. Versions up to and including 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. An attacker can break out of the JSON path string context and inject arbitrary SQL. This is inconsistent with `sanitizeIdentifier()`, which properly doubles delimiter characters for identifiers — both are non-parameterizable SQL constructs requiring manual escaping, but only identifiers are protected. Version 0.28.12 fixes the issue.
21 advisories report this vulnerability, across 3 ecosystems.
Advisories
- CGA-23xc-5w23-xpfx
- CGA-2xp8-63r3-92fw
- CGA-36qh-q6j3-jxfg
- CGA-396q-8hm8-c23j
- CGA-4f26-g57f-q5gw
- CGA-583c-vvf7-w35w
- CGA-5c3h-wjfv-cr4p
- CGA-736f-wmr2-2qq9
- CGA-7ppj-58g9-pjh4
- CGA-95pv-862x-337r
- CGA-cxgg-7v8p-gqjp
- CGA-gfpm-2g8v-5xpp
- CGA-gw62-638j-fqj8
- CGA-hwpg-rfrq-x458
- CGA-m7j4-cw3v-wr8r
- CGA-pmx7-584p-5p5x
- CGA-qqwj-r9j7-f23x
- CGA-x42h-4cgv-5998
- CGA-x985-xg7q-h33h
- CGA-xj8q-jr5j-mmvj
-
GHSA-wmrf-hv6w-mr66
SQL Injection via unsanitized JSON path keys when ignoring/silencing compilation errors or using `Kysely<any>`.