{"id":"CVE-2026-32763","published":"2026-03-19T23:14:58Z","modified":"2026-03-21T03:05:22Z","title":"SQL Injection via unsanitized JSON path keys when ignoring/silencing compilation errors or using `Kysely<any>`.","vendor":"kysely-org","product":"kysely","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.2,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00462,"percentile":0.40877,"provenance":"source"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"references":[{"url":"https://github.com/kysely-org/kysely/security/advisories/GHSA-wmrf-hv6w-mr66","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/kysely-org/kysely/commit/0a602bff2f442f6c26d5e047ca8f8715179f6d24","tags":["x_refsource_MISC"]},{"url":"https://github.com/kysely-org/kysely/releases/tag/v0.28.12","tags":["x_refsource_MISC"]}],"priority":{"score":13.9,"factors":[{"name":"EPSS percentile","points":8.18},{"name":"CVSS severity","points":5.74}]},"vendorSlug":"kysely-org","affectedVersions":[{"vendor":"kysely-org","product":"kysely","versions":[">= 0.26.0, < 0.28.12"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-03-21T03:04:47.575074Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"kysely","vulnerableRanges":[">=0.26.0, <0.28.12"],"patched":["0.28.12"],"from":["GHSA-wmrf-hv6w-mr66"],"provenance":"source"}],"summary":{"text":"Kysely, a type-safe TypeScript SQL query builder, has a SQL injection flaw in its JSON path compilation for the MySQL and SQLite dialects, where values passed to .key() and .at() are placed into single-quoted JSON path literals without escaping single quotes. An unauthenticated remote attacker who can supply a JSON path key that reaches these calls, without any user interaction or special configuration, can break out of the string context and inject arbitrary SQL, with the impact primarily on confidentiality and integrity.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:41:02Z"},"euvd":{"id":"EUVD-2026-13392","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-32763","published":"2026-03-19","fixed":"0.28.12","kev":false},{"cve":"CVE-2026-33442","published":"2026-03-26","fixed":"0.28.14","kev":false,"link":{"from":"CVE-2026-32763","to":"CVE-2026-33442","relation":"successor","confidence":"medium","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:kysely","fromFixed":"0.28.12","toFixed":"0.28.14","daysApart":7},{"kind":"similar","provenance":"machine","score":0.36,"basis":"same product + CWE + description similarity"}]}},{"cve":"CVE-2026-33468","published":"2026-03-26","fixed":"0.28.14","kev":false,"link":{"from":"CVE-2026-32763","to":"CVE-2026-33468","relation":"successor","confidence":"medium","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:kysely","fromFixed":"0.28.12","toFixed":"0.28.14","daysApart":7},{"kind":"similar","provenance":"machine","score":0.27,"basis":"same product + CWE + description similarity"}]}},{"cve":"CVE-2026-44635","published":"2026-05-27","fixed":"0.28.17","kev":false}],"package":"npm:kysely"}}