CVE-2022-27384

7.5 HIGH

📋 TL;DR

This vulnerability in MariaDB Server allows attackers to cause a Denial of Service (DoS) by sending specially crafted SQL statements. It affects MariaDB Server versions 10.6 and below. Database administrators and organizations running vulnerable MariaDB instances are affected.

💻 Affected Systems

Products:
  • MariaDB Server
Versions: 10.6 and below (all versions up to and including 10.6)
Operating Systems: All operating systems running MariaDB
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all configurations where the vulnerable component is present. Requires ability to execute SQL statements against the database.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database service disruption, making applications dependent on the database unavailable to users.

🟠

Likely Case

Temporary service interruption requiring database restart, causing application downtime.

🟢

If Mitigated

Minimal impact with proper network segmentation and access controls limiting who can send SQL queries.

🌐 Internet-Facing: HIGH if database is directly exposed to the internet without proper authentication or firewalls.
🏢 Internal Only: MEDIUM as authenticated users or compromised internal systems could still trigger the DoS.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires ability to execute SQL statements. The vulnerability is in the Item_subselect::init_expr_cache_tracker component and involves specially crafted SQL.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: MariaDB 10.6.6 and later versions

Vendor Advisory: https://jira.mariadb.org/browse/MDEV-26047

Restart Required: Yes

Instructions:

1. Check current MariaDB version. 2. Backup databases. 3. Upgrade to MariaDB 10.6.6 or later. 4. Restart MariaDB service. 5. Verify upgrade completed successfully.

🔧 Temporary Workarounds

Restrict SQL Execution

all

Limit which users/applications can execute SQL statements against the database

Network Segmentation

all

Ensure database is not directly accessible from untrusted networks

🧯 If You Can't Patch

  • Implement strict access controls to limit who can execute SQL queries
  • Monitor database logs for unusual SQL patterns and implement rate limiting

🔍 How to Verify

Check if Vulnerable:

Check MariaDB version: If version is 10.6.5 or below, system is vulnerable.

Check Version:

mysql --version or SELECT VERSION();

Verify Fix Applied:

After patching, verify version is 10.6.6 or higher and test database functionality.

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed SQL queries
  • Database crash/restart events
  • Unusual SQL patterns targeting subselect expressions

Network Indicators:

  • Sudden increase in SQL traffic from single source
  • Database connection spikes followed by service interruption

SIEM Query:

source="mariadb.log" AND ("crash" OR "restart" OR "error" OR "failed")

🔗 References

📤 Share & Export