CVE-2023-36370

7.5 HIGH

📋 TL;DR

This vulnerability in MonetDB Server's gc_col component allows attackers to execute crafted SQL statements that cause a Denial of Service (DoS) by crashing or hanging the database server. It affects MonetDB Server versions 11.45.17 and 11.46.0, potentially impacting any organization using these versions in production environments.

💻 Affected Systems

Products:
  • MonetDB Server
Versions: 11.45.17 and 11.46.0
Operating Systems: All platforms running MonetDB
Default Config Vulnerable: ⚠️ Yes
Notes: Any configuration where users can execute SQL statements against the vulnerable versions is affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database service disruption requiring manual restart, potentially causing extended downtime and data unavailability for applications.

🟠

Likely Case

Database service crashes or becomes unresponsive, requiring administrator intervention to restart the MonetDB service.

🟢

If Mitigated

Minimal impact with proper network segmentation and access controls limiting who can execute SQL against the database.

🌐 Internet-Facing: HIGH if MonetDB is exposed to untrusted networks, as attackers can directly send crafted SQL to trigger the DoS.
🏢 Internal Only: MEDIUM as it still requires SQL execution privileges, but insider threats or compromised internal accounts could exploit it.

🎯 Exploit Status

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

Exploitation requires ability to execute SQL statements against the database, but the specific crafted SQL is not publicly documented.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after 11.45.17 and 11.46.0 (check MonetDB releases for specific fixed versions)

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

Restart Required: Yes

Instructions:

1. Check current MonetDB version. 2. Upgrade to a patched version from official MonetDB repositories. 3. Restart MonetDB service. 4. Verify the upgrade was successful.

🔧 Temporary Workarounds

Restrict SQL Execution

all

Limit which users and applications can execute SQL against the database to reduce attack surface.

# Review and tighten database user permissions
# Use application-level controls to validate SQL inputs

Network Segmentation

linux

Isolate MonetDB servers from untrusted networks and limit access to trusted IPs only.

# Configure firewall rules to restrict access
# iptables -A INPUT -p tcp --dport 50000 -s trusted_ip -j ACCEPT

🧯 If You Can't Patch

  • Implement strict network access controls to limit who can connect to MonetDB
  • Monitor database logs for unusual SQL patterns and implement rate limiting on SQL execution

🔍 How to Verify

Check if Vulnerable:

Check MonetDB version: if it's exactly 11.45.17 or 11.46.0, it's vulnerable.

Check Version:

mclient -d <database> -s 'SELECT monetdb_version();'

Verify Fix Applied:

After upgrade, verify the version is no longer 11.45.17 or 11.46.0 and test database functionality.

📡 Detection & Monitoring

Log Indicators:

  • Database crash logs
  • Unexpected service restarts
  • Error messages related to gc_col or memory allocation

Network Indicators:

  • Unusual SQL query patterns from unexpected sources
  • Multiple connection attempts followed by service disruption

SIEM Query:

source="monetdb.log" AND ("crash" OR "segfault" OR "abort" OR "panic")

🔗 References

📤 Share & Export