{"id":"CVE-2026-33468","published":"2026-03-26T17:03:05Z","modified":"2026-03-26T19:52:10Z","title":"Kysely has a MySQL SQL Injection via Insufficient Backslash Escaping in `sql.lit(string)` usage or similar methods…","vendor":"kysely-org","product":"kysely","tier":"tail","description":{"text":"Kysely is a type-safe TypeScript SQL query builder. Prior to version 0.28.14, Kysely's `DefaultQueryCompiler.sanitizeStringLiteral()` only escapes single quotes by doubling them (`'` → `''`) but does not escape backslashes. When used with the MySQL dialect (where `NO_BACKSLASH_ESCAPES` is OFF by default), an attacker can use a backslash to escape the trailing quote of a string literal, breaking out of the string context and injecting arbitrary SQL. This affects any code path that uses `ImmediateValueTransformer` to inline values — specifically `CreateIndexBuilder.where()` and `CreateViewBuilder.as()`. Version 0.28.14 contains a fix.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00462,"percentile":0.40837,"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-8cpq-38p9-67gx","tags":["x_refsource_CONFIRM"]}],"priority":{"score":13.8,"factors":[{"name":"EPSS percentile","points":8.17},{"name":"CVSS severity","points":5.67}]},"vendorSlug":"kysely-org","affectedVersions":[{"vendor":"kysely-org","product":"kysely","versions":["< 0.28.14"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-03-26T19:48:27.840503Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"kysely","vulnerableRanges":["<0.28.14"],"patched":["0.28.14"],"from":["GHSA-8cpq-38p9-67gx"],"provenance":"source"}],"summary":{"text":"The Kysely SQL query builder, prior to version 0.28.14, fails to escape backslashes in its string-literal sanitizer, so when used with the MySQL dialect it allows SQL injection through the inlined values in CreateIndexBuilder.where() and CreateViewBuilder.as(). An unauthenticated remote attacker can exploit this with no user interaction and no special configuration, provided the MySQL server runs with its default settings and the affected code path receives attacker-controlled input.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:41:41Z"},"euvd":{"id":"EUVD-2026-16265","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-32763","published":"2026-03-19","fixed":"0.28.12","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-33442","published":"2026-03-26","fixed":"0.28.14","kev":false},{"cve":"CVE-2026-33468","published":"2026-03-26","fixed":"0.28.14","kev":false},{"cve":"CVE-2026-44635","published":"2026-05-27","fixed":"0.28.17","kev":false}],"package":"npm:kysely"}}