CVE-2026-33442 Details
Description
Kysely is a type-safe TypeScript SQL query builder. In versions 0.28.12 and 0.28.13, the `sanitizeStringLiteral` method in Kysely's query compiler escapes single quotes (`'` → `''`) but does not escape backslashes. On MySQL with the default `BACKSLASH_ESCAPES` SQL mode, an attacker can inject a backslash before a single quote to neutralize the escaping, breaking out of the JSON path string literal and injecting arbitrary SQL. Version 0.28.14 fixes the issue.
A SQL injection vulnerability has been identified in Kysely, a type-safe TypeScript SQL query builder, specifically in versions 0.28.12 and 0.28.13. The issue arises in the `sanitizeStringLiteral` method of Kysely's query compiler, which improperly escapes backslashes while correctly handling single quotes. This flaw can be exploited on MySQL databases with the default `BACKSLASH_ESCAPES` SQL mode. By injecting a backslash before a single quote, an attacker can disrupt the escaping mechanism, escape out of a JSON path string literal, and inject arbitrary SQL. The vulnerability is present in any application using Kysely with MySQL that passes user-controlled input to JSON path builder methods, such as `.key()` or `.at()`.
Users can upgrade to Kysely version 0.28.14 or later, where this vulnerability has been fixed. Alternatively, for those using the MySQL dialect, the `sanitizeStringLiteral` method can be overridden to properly escape backslashes in addition to single quotes.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 26, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/kysely-org/kysely/security/advisories/GHSA-fr9j-6mvq-frcv | [email protected] | ExploitMitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| kysely kysely | >= 0.28.12, < 0.28.14 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 31, 2026 | Initial Analysis | [email protected] |
| Mar 26, 2026 | New CVE Received | [email protected] |