CVE-2026-33442

8.1

Kysely · Kysely (TypeScript SQL query builder)

Kysely versions 0.28.12 and 0.28.13 are vulnerable to SQL injection due to improper sanitization of string literals when used with MySQL in default configurations.

Executive summary

An unauthenticated SQL injection vulnerability in the Kysely query builder allows attackers to execute arbitrary SQL commands by exploiting insufficient backslash escaping in string literals.

Vulnerability

The vulnerability exists in the sanitizeStringLiteral method, which fails to correctly escape backslashes when interacting with MySQL databases configured with default settings. An unauthenticated attacker can leverage this to neutralize single-quote escaping, break out of string literals, and inject malicious SQL queries.

Business impact

Successful exploitation of this vulnerability can lead to complete compromise of the database, including unauthorized data exfiltration, modification, or deletion. Given the CVSS score of 8.1, the high potential for impact on confidentiality, integrity, and availability necessitates immediate attention to prevent unauthorized access to sensitive application data.

Remediation

Immediate Action: Update the Kysely package to version 0.28.14 or later to implement the corrected string sanitization logic.

Proactive Monitoring: Review database query logs for anomalous patterns or unexpected syntax characters such as backslashes within input fields that should contain standard text.

Compensating Controls: Deploy a Web Application Firewall (WAF) with updated rulesets designed to detect and block common SQL injection patterns until the application dependencies can be patched.

Exploitation status

Public Exploit Available: No (exploit_available: false)

Analyst recommendation

The vulnerability represents a significant risk to application security due to the potential for full database compromise. Administrators should prioritize updating the Kysely dependency to version 0.28.14 immediately to ensure the integrity of SQL query compilation and prevent potential injection attacks.

Sources