Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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
    • AI 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-2021-46666

CVE-2021-46666: MariaDB DoS Vulnerability

CVE-2021-46666 is a denial of service vulnerability in MariaDB caused by mishandling of a pushdown from a HAVING clause to a WHERE clause. This article covers technical details, affected versions, impact, and mitigation.

Published: February 25, 2026

CVE-2021-46666 Overview

CVE-2021-46666 is a Denial of Service vulnerability affecting MariaDB database server versions prior to 10.6.2. The vulnerability allows an application crash due to mishandling of a pushdown from a HAVING clause to a WHERE clause during SQL query processing. This improper handling can be triggered by authenticated local users with database access, potentially causing service disruption.

Critical Impact

Authenticated users can cause MariaDB server crashes through specially crafted SQL queries, leading to denial of service and potential disruption of dependent applications.

Affected Products

  • MariaDB versions prior to 10.2.40
  • MariaDB versions prior to 10.3.31
  • MariaDB versions prior to 10.4.21
  • MariaDB versions prior to 10.5.12
  • MariaDB versions prior to 10.6.2

Discovery Timeline

  • 2022-02-01 - CVE-2021-46666 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-46666

Vulnerability Analysis

This vulnerability is classified under CWE-617 (Reachable Assertion), which involves application logic that can reach a state causing an assertion failure and subsequent crash. In MariaDB, the query optimizer includes functionality to push down conditions from the HAVING clause to the WHERE clause when optimizing certain types of queries. This optimization is designed to improve query performance by filtering data earlier in the execution pipeline.

However, due to improper handling during this pushdown operation, certain malformed or edge-case queries can trigger an internal assertion failure or unhandled exception within the MariaDB server. When this condition is reached, the database server crashes, resulting in immediate denial of service for all connected clients and applications.

Root Cause

The root cause lies in the query optimization logic that handles the transformation of HAVING clause predicates into WHERE clause conditions. The code path fails to properly validate or handle specific edge cases during this transformation, leading to a reachable assertion (CWE-617). When the assertion condition is violated during query execution, the server terminates abnormally rather than gracefully handling the error condition.

Attack Vector

The attack requires local access and low privileges - an attacker needs valid database credentials to execute queries against the MariaDB server. The attacker crafts a SQL query with specific HAVING clause constructs that trigger the faulty optimization path during query compilation or execution.

The vulnerability exploitation mechanism involves crafting SQL queries with HAVING clauses that trigger the vulnerable pushdown optimization path. When the MariaDB query optimizer attempts to transform these clauses, it encounters an unhandled state that results in a server crash. Detailed technical information about the specific query patterns can be found in the MariaDB Issue Tracker Entry.

Detection Methods for CVE-2021-46666

Indicators of Compromise

  • Unexpected MariaDB server crashes or restarts without apparent cause
  • Error logs containing assertion failure messages related to query optimization
  • Patterns of complex queries with unusual HAVING clause constructs preceding crashes
  • Multiple database connection resets occurring simultaneously

Detection Strategies

  • Monitor MariaDB error logs for assertion failure messages and abnormal termination signals
  • Implement query logging to identify patterns of queries containing complex HAVING clauses
  • Deploy database activity monitoring to detect unusual query patterns from authenticated users
  • Configure process monitoring to alert on unexpected MariaDB daemon restarts

Monitoring Recommendations

  • Enable MariaDB general query log during incident investigation to capture triggering queries
  • Configure system-level process monitoring for mysqld or mariadbd process crashes
  • Set up automated alerts for database availability monitoring with rapid detection thresholds
  • Review authentication logs to correlate crashes with specific user sessions

How to Mitigate CVE-2021-46666

Immediate Actions Required

  • Upgrade MariaDB to version 10.6.2 or later immediately
  • For older release branches, upgrade to 10.5.12, 10.4.21, 10.3.31, or 10.2.40 depending on your deployment
  • Review database user privileges and restrict access to only necessary accounts
  • Implement query monitoring to detect potential exploitation attempts

Patch Information

MariaDB has released security patches addressing this vulnerability in multiple supported branches. The fix is included in MariaDB versions 10.2.40, 10.3.31, 10.4.21, 10.5.12, and 10.6.2 and later. Organizations should consult the MariaDB Security Knowledge Base for complete patch details and download links. Additional advisory information is available from NetApp Security Advisory NTAP-20220221-0002.

Workarounds

  • Restrict database access to trusted users only until patching is complete
  • Implement application-level query validation to reject potentially malicious HAVING clause constructs
  • Consider deploying database connection pooling with query inspection capabilities
  • Enable query timeout limits to minimize impact of any potential crash attempts
bash
# Verify MariaDB version to check vulnerability status
mariadb --version

# Check current version via SQL
mysql -u admin -p -e "SELECT VERSION();"

# Review user privileges for potential restriction
mysql -u admin -p -e "SELECT user, host FROM mysql.user;"

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechMariadb

  • SeverityMEDIUM

  • CVSS Score5.5

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-617
  • Technical References
  • NetApp Security Advisory NTAP-20220221-0002
  • Vendor Resources
  • MariaDB Issue Tracker Entry

  • MariaDB Security Knowledge Base
  • Related CVEs
  • CVE-2026-35549: MariaDB Server DoS Vulnerability

  • CVE-2022-47015: MariaDB Server DoS Vulnerability

  • CVE-2022-32085: MariaDB DoS Vulnerability

  • CVE-2022-32083: MariaDB Segmentation Fault 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