CVE-2022-27380

7.5 HIGH

📋 TL;DR

A vulnerability in MariaDB Server's my_decimal::operator= component allows attackers to cause Denial of Service (DoS) through specially crafted SQL statements. This affects MariaDB Server versions 10.6.3 and below, potentially disrupting database availability for applications using these versions.

💻 Affected Systems

Products:
  • MariaDB Server
Versions: 10.6.3 and below
Operating Systems: All operating systems running affected MariaDB versions
Default Config Vulnerable: ⚠️ Yes
Notes: All default configurations are vulnerable if using affected versions

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database service disruption leading to application downtime and data unavailability

🟠

Likely Case

Database service crashes requiring restart, causing temporary application disruption

🟢

If Mitigated

Minimal impact with proper network segmentation and query filtering

🌐 Internet-Facing: HIGH - Internet-facing MariaDB instances are directly exposed to crafted SQL attacks
🏢 Internal Only: MEDIUM - Internal systems still vulnerable to authenticated users or compromised accounts

🎯 Exploit Status

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

Exploitation requires ability to execute SQL statements against the database

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: MariaDB 10.6.4 and later

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

Restart Required: Yes

Instructions:

1. Backup databases. 2. Upgrade MariaDB to version 10.6.4 or later. 3. Restart MariaDB service. 4. Verify version and functionality.

🔧 Temporary Workarounds

SQL Query Filtering

all

Implement input validation and filtering for decimal operations in SQL queries

Network Access Control

all

Restrict database access to trusted applications and users only

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate MariaDB instances
  • Deploy web application firewall (WAF) with SQL injection protection rules

🔍 How to Verify

Check if Vulnerable:

Check MariaDB version: mysql --version or SELECT VERSION();

Check Version:

mysql --version

Verify Fix Applied:

Confirm version is 10.6.4 or later and test decimal operations

📡 Detection & Monitoring

Log Indicators:

  • Database crash logs
  • Unexpected service restarts
  • Error messages related to decimal operations

Network Indicators:

  • Unusual SQL query patterns targeting decimal functions

SIEM Query:

source="mariadb.log" AND ("crash" OR "segfault" OR "decimal")

🔗 References

📤 Share & Export