The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-33442

CVE-2026-33442: Kysely SQL Injection Vulnerability

CVE-2026-33442 is an SQL injection flaw in Kysely's query compiler affecting versions 0.28.12 and 0.28.13. Attackers can exploit incomplete string sanitization to inject arbitrary SQL code in MySQL environments.

Published: March 27, 2026

CVE-2026-33442 Overview

Kysely, a popular type-safe TypeScript SQL query builder, contains a SQL Injection vulnerability in versions 0.28.12 and 0.28.13. The vulnerability exists in the sanitizeStringLiteral method within Kysely's query compiler, which fails to properly escape backslash characters. While the method correctly escapes single quotes (' → ''), the lack of backslash escaping allows attackers to inject a backslash before a single quote, effectively neutralizing the escape mechanism.

When exploited against MySQL databases configured with the default BACKSLASH_ESCAPES SQL mode, this vulnerability enables attackers to break out of JSON path string literals and inject arbitrary SQL commands, potentially leading to full database compromise.

Critical Impact

Attackers can bypass SQL injection protections in Kysely query builder to execute arbitrary SQL commands on MySQL databases, potentially leading to unauthorized data access, modification, or deletion.

Affected Products

  • Kysely 0.28.12
  • Kysely 0.28.13

Discovery Timeline

  • 2026-03-26 - CVE-2026-33442 published to NVD
  • 2026-03-26 - Last updated in NVD database

Technical Details for CVE-2026-33442

Vulnerability Analysis

This SQL Injection vulnerability (CWE-89) stems from incomplete input sanitization in the Kysely query compiler. The sanitizeStringLiteral method implements escaping logic that transforms single quotes into doubled single quotes, which is a standard SQL escaping technique. However, the implementation overlooks backslash character handling.

MySQL, by default, operates with the BACKSLASH_ESCAPES SQL mode enabled, which treats backslash as an escape character. When an attacker provides input containing a backslash followed by a single quote (\'), the backslash escapes the quote character at the MySQL level. Since Kysely's sanitization only doubles the single quote without addressing the preceding backslash, the input \' becomes \'' after sanitization. MySQL interprets this as an escaped single quote followed by a literal single quote, effectively breaking out of the string context.

This escape sequence manipulation allows attackers to terminate the intended string literal prematurely and append malicious SQL code that executes within the context of the original query.

Root Cause

The root cause lies in the incomplete character escaping implementation within the sanitizeStringLiteral method. The function addresses single quote escaping but fails to account for MySQL's default behavior of treating backslashes as escape characters. This oversight creates a character sequence that can bypass the sanitization logic when the escaped output is processed by MySQL's query parser.

Attack Vector

The attack exploits the network-accessible nature of applications using Kysely for database operations. An attacker requires no authentication or special privileges to exploit this vulnerability. By crafting malicious input containing strategically placed backslash and single quote sequences, the attacker can:

  1. Inject input through any application endpoint that processes user-supplied data via Kysely queries
  2. Use a backslash to escape the single quote that Kysely adds during sanitization
  3. Break out of the JSON path string literal context
  4. Append arbitrary SQL statements that execute with the database privileges of the application

The vulnerability specifically targets MySQL deployments using the default BACKSLASH_ESCAPES SQL mode, making it widely applicable to common MySQL configurations.

Detection Methods for CVE-2026-33442

Indicators of Compromise

  • Unusual SQL query patterns in database logs containing backslash sequences followed by single quotes (\')
  • Database error logs showing syntax errors in JSON path operations
  • Unexpected data access or modification events in audit logs
  • Application logs containing malformed or unusually long input strings with escape sequences

Detection Strategies

  • Implement database query logging and analyze for anomalous patterns involving backslash-quote combinations
  • Deploy Web Application Firewall (WAF) rules to detect SQL injection patterns targeting backslash escape sequences
  • Monitor application input validation logs for attempts to submit strings containing \' sequences
  • Use database activity monitoring (DAM) solutions to identify unexpected query structures

Monitoring Recommendations

  • Enable MySQL general query log or slow query log for forensic analysis capabilities
  • Configure alerting for SQL syntax errors that may indicate injection attempts
  • Implement real-time monitoring of database connections for unusual query volumes or patterns
  • Review application logs for input validation failures related to special character handling

How to Mitigate CVE-2026-33442

Immediate Actions Required

  • Upgrade Kysely to version 0.28.14 or later, which includes the security fix for backslash escaping
  • Review application code for any custom sanitization logic that may have similar backslash handling gaps
  • Audit recent database activity logs for potential exploitation attempts
  • Implement additional input validation at the application layer as defense-in-depth

Patch Information

Kysely version 0.28.14 addresses this vulnerability by properly escaping backslash characters in addition to single quotes within the sanitizeStringLiteral method. Organizations should update their dependencies immediately using their package manager.

For detailed information about the security fix, refer to the GitHub Security Advisory.

Workarounds

  • Disable MySQL's BACKSLASH_ESCAPES SQL mode by setting sql_mode to include NO_BACKSLASH_ESCAPES, which prevents backslash from being treated as an escape character
  • Implement application-level input validation to reject or sanitize backslash characters before they reach the query builder
  • Use parameterized queries or prepared statements where possible as an additional layer of protection
  • Deploy a WAF with SQL injection detection rules specifically configured for backslash escape bypass patterns
bash
# MySQL configuration to disable backslash escapes (workaround)
# Add to my.cnf or my.ini configuration file
[mysqld]
sql_mode = "NO_BACKSLASH_ESCAPES,STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"

# Or set dynamically (session-level)
# SET SESSION sql_mode = 'NO_BACKSLASH_ESCAPES';

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechKysely

  • SeverityHIGH

  • CVSS Score8.1

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-89
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-33468: Kysely TypeScript SQL Injection Vulnerability

  • CVE-2026-32763: Kysely TypeScript SQL Injection Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English