Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. kysely
  4. ›
  5. CVE-2026-33468

CVE-2026-33468: Kysely has a MySQL SQL Injection via Insufficient Backslash Escaping in `sql.lit(string)` usage or similar methods that append string literal values into the compiled SQL strings

March 20, 2026 (updated March 27, 2026)

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().

References

  • github.com/advisories/GHSA-8cpq-38p9-67gx
  • github.com/kysely-org/kysely
  • github.com/kysely-org/kysely/security/advisories/GHSA-8cpq-38p9-67gx
  • nvd.nist.gov/vuln/detail/CVE-2026-33468

Code Behaviors & Features

Detect and mitigate CVE-2026-33468 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.28.14

Fixed versions

  • 0.28.14

Solution

Upgrade to version 0.28.14 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Source file

npm/kysely/CVE-2026-33468.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:18:17 +0000.