CVE-2024-57632

7.5 HIGH

📋 TL;DR

A SQL injection vulnerability in MonetDB Server's is_column_unique component allows attackers to execute crafted SQL statements that cause denial of service. This affects all systems running vulnerable versions of MonetDB Server, particularly those exposed to untrusted SQL input.

💻 Affected Systems

Products:
  • MonetDB Server
Versions: v11.49.1 and potentially earlier versions
Operating Systems: All platforms running MonetDB
Default Config Vulnerable: ⚠️ Yes
Notes: All deployments using the vulnerable version are affected regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database unavailability through resource exhaustion or crash, potentially affecting dependent applications and services.

🟠

Likely Case

Temporary service disruption requiring database restart, with potential data corruption in active transactions.

🟢

If Mitigated

Minimal impact with proper input validation and query restrictions in place.

🌐 Internet-Facing: HIGH - Database servers exposed to internet could be targeted by automated scanning and exploitation attempts.
🏢 Internal Only: MEDIUM - Requires authenticated database access, but insider threats or compromised accounts could exploit.

🎯 Exploit Status

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

Requires database authentication and ability to execute SQL statements. Crafted SQL triggers the vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check GitHub issue for specific fixed version

Vendor Advisory: https://github.com/MonetDB/MonetDB/issues/7441

Restart Required: No

Instructions:

1. Check current MonetDB version. 2. Update to patched version from official repository. 3. Verify fix by testing with safe queries.

🔧 Temporary Workarounds

Restrict SQL Execution

all

Limit database user permissions to prevent execution of complex queries against is_column_unique functionality

REVOKE EXECUTE ON FUNCTION is_column_unique FROM public;
GRANT EXECUTE ON FUNCTION is_column_unique TO trusted_users_only;

🧯 If You Can't Patch

  • Implement strict input validation and sanitization for all SQL queries
  • Deploy network segmentation and restrict database access to only trusted applications

🔍 How to Verify

Check if Vulnerable:

Check MonetDB version: SELECT value FROM sys.version(); If version is v11.49.1 or earlier, assume vulnerable.

Check Version:

SELECT value FROM sys.version();

Verify Fix Applied:

After update, verify version is newer than v11.49.1 and test with previously problematic queries.

📡 Detection & Monitoring

Log Indicators:

  • Unusually long query execution times
  • Database crash/restart events
  • Multiple failed query attempts with similar patterns

Network Indicators:

  • Sudden spike in database connection attempts
  • Abnormal SQL query patterns from single source

SIEM Query:

source="monetdb.log" AND ("crash" OR "restart" OR "timeout") AND "is_column_unique"

🔗 References

📤 Share & Export