Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-33442: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in kysely-org kysely

0
High
VulnerabilityCVE-2026-33442cvecve-2026-33442cwe-89
Published: Thu Mar 26 2026 (03/26/2026, 17:01:57 UTC)
Source: CVE Database V5
Vendor/Project: kysely-org
Product: kysely

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.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/26/2026, 17:31:32 UTC

Technical Analysis

CVE-2026-33442 is an SQL injection vulnerability affecting the Kysely SQL query builder, specifically versions 0.28.12 and 0.28.13. Kysely is a type-safe TypeScript library used to build SQL queries programmatically. The vulnerability stems from the sanitizeStringLiteral method in Kysely's query compiler, which escapes single quotes by doubling them (' → '') but does not escape backslashes. In MySQL databases configured with the default BACKSLASH_ESCAPES SQL mode, a backslash acts as an escape character. An attacker can exploit this by injecting a backslash before a single quote within a JSON path string literal, effectively neutralizing the escaping mechanism. This allows the attacker to break out of the intended string context and inject arbitrary SQL commands. Such injection can lead to unauthorized data access, data modification, or denial of service. The vulnerability does not require authentication or user interaction, increasing its risk. The issue was identified and fixed in Kysely version 0.28.14, which properly handles backslash escaping to prevent injection. No known exploits are reported in the wild yet, but the high CVSS score (8.1) reflects the critical nature of the flaw due to its potential impact and ease of exploitation in vulnerable environments.

Potential Impact

The SQL injection vulnerability in Kysely can have severe consequences for organizations using affected versions with MySQL databases. Exploitation can lead to unauthorized disclosure of sensitive data, data corruption or deletion, and potential full compromise of the database server. Since the vulnerability requires no authentication or user interaction, attackers can remotely exploit it if they can influence query inputs, such as through web applications or APIs using Kysely. This can result in data breaches, loss of data integrity, service outages, and reputational damage. Organizations relying on Kysely for database interactions may face compliance violations if sensitive data is exposed. The impact is amplified in environments where MySQL's default BACKSLASH_ESCAPES mode is enabled, which is common. Given the widespread use of TypeScript and Node.js in modern web applications, many organizations globally could be affected if they use the vulnerable Kysely versions without patching.

Mitigation Recommendations

The primary mitigation is to upgrade Kysely to version 0.28.14 or later, where the vulnerability is fixed by properly escaping backslashes in string literals. Organizations should audit their codebases to identify usage of Kysely versions 0.28.12 or 0.28.13 and plan immediate upgrades. Additionally, developers should review all SQL query constructions to ensure proper parameterization and avoid manual string concatenation. Enforcing the use of parameterized queries or prepared statements can reduce injection risks. Database administrators should verify MySQL SQL modes and consider disabling BACKSLASH_ESCAPES if feasible, although this may impact application compatibility. Implementing Web Application Firewalls (WAFs) with rules to detect and block SQL injection patterns can provide temporary protection. Finally, monitoring database logs for suspicious query patterns and unusual activity can help detect exploitation attempts early.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-19T18:45:22.438Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69c569d6f4197a8e3be94d8c

Added to database: 3/26/2026, 5:16:06 PM

Last enriched: 3/26/2026, 5:31:32 PM

Last updated: 3/26/2026, 8:26:15 PM

Views: 7

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses