CVE-2024-27766

5.7 MEDIUM

📋 TL;DR

This CVE describes a potential remote code execution vulnerability in MariaDB v.11.1 through the lib_mysqludf_sys.so function. The vulnerability allows attackers to execute arbitrary code on affected systems, though the MariaDB Foundation disputes this claim, stating no privilege boundary is crossed. Systems running vulnerable MariaDB versions with the UDF function enabled are potentially affected.

💻 Affected Systems

Products:
  • MariaDB
Versions: v.11.1
Operating Systems: Linux, Unix-like systems
Default Config Vulnerable: ✅ No
Notes: Requires the lib_mysqludf_sys.so UDF function to be installed and enabled; default MariaDB installations may not be vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote attacker gains full system control through arbitrary code execution, potentially leading to data theft, system compromise, or lateral movement.

🟠

Likely Case

Limited impact due to the disputed nature and requirement for specific configurations; most likely unauthorized data access or denial of service.

🟢

If Mitigated

Minimal impact if proper access controls, network segmentation, and least privilege principles are implemented.

🌐 Internet-Facing: MEDIUM - While potentially exploitable remotely, the disputed nature and configuration requirements reduce immediate risk.
🏢 Internal Only: LOW - Internal systems with proper network controls and limited user access face minimal risk from this vulnerability.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires database access and specific UDF configuration; the vulnerability is disputed by the vendor.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not applicable - vulnerability disputed by vendor

Vendor Advisory: No official advisory - vulnerability disputed

Restart Required: No

Instructions:

No official patch; consider upgrading to latest MariaDB version and removing unnecessary UDF functions.

🔧 Temporary Workarounds

Remove lib_mysqludf_sys.so UDF

all

Uninstall or disable the vulnerable UDF function to prevent exploitation

DROP FUNCTION IF EXISTS sys_exec;
DROP FUNCTION IF EXISTS sys_eval;

Restrict UDF Loading

all

Configure MariaDB to prevent loading of external UDF functions

Set 'allow-suspicious-udfs = FALSE' in my.cnf

🧯 If You Can't Patch

  • Implement strict network access controls to limit database exposure
  • Apply principle of least privilege to database users and remove unnecessary permissions

🔍 How to Verify

Check if Vulnerable:

Check if lib_mysqludf_sys.so is installed: SELECT * FROM mysql.func WHERE name LIKE 'sys_%';

Check Version:

SELECT VERSION();

Verify Fix Applied:

Verify UDF functions are removed: SELECT * FROM mysql.func WHERE name LIKE 'sys_%'; should return empty

📡 Detection & Monitoring

Log Indicators:

  • Unusual UDF function creation or execution
  • Suspicious database queries attempting to load external functions

Network Indicators:

  • Unexpected database connections from unauthorized sources
  • Anomalous traffic patterns to database port

SIEM Query:

source="mariadb.log" AND ("CREATE FUNCTION" OR "lib_mysqludf_sys" OR "sys_exec" OR "sys_eval")

🔗 References

📤 Share & Export