CVE-2019-16536

8.8 HIGH

📋 TL;DR

A stack overflow vulnerability in ClickHouse allows authenticated malicious clients to trigger denial of service by sending specially crafted requests. This affects ClickHouse database servers running versions before 19.14.3.3. Organizations using vulnerable ClickHouse instances with authenticated client access are at risk.

💻 Affected Systems

Products:
  • ClickHouse
Versions: All versions before 19.14.3.3
Operating Systems: All platforms running ClickHouse
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated client access; ClickHouse instances without authentication configured may be less vulnerable but still at risk from authorized users.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service disruption of ClickHouse database, potentially affecting dependent applications and causing extended downtime.

🟠

Likely Case

Targeted DoS attacks against ClickHouse instances by authenticated malicious actors, causing temporary service unavailability.

🟢

If Mitigated

Limited impact with proper network segmentation, authentication controls, and monitoring in place.

🌐 Internet-Facing: HIGH - Internet-facing ClickHouse instances with authenticated access are directly exploitable.
🏢 Internal Only: MEDIUM - Internal instances are still vulnerable to insider threats or compromised internal accounts.

🎯 Exploit Status

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

Exploitation requires authenticated access but is technically straightforward once authentication is obtained.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 19.14.3.3 and later

Vendor Advisory: https://clickhouse.com/docs/whats-new/security-changelog

Restart Required: Yes

Instructions:

1. Backup ClickHouse data and configuration. 2. Stop ClickHouse service. 3. Upgrade to version 19.14.3.3 or later using your package manager. 4. Restart ClickHouse service. 5. Verify successful upgrade and service functionality.

🔧 Temporary Workarounds

Restrict Client Access

linux

Limit network access to ClickHouse to only trusted IP addresses and required applications.

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

Enforce Strong Authentication

all

Implement strong authentication mechanisms and limit user privileges to minimum required.

# Review and harden ClickHouse users.xml configuration
# Remove unnecessary users and restrict permissions

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate ClickHouse from untrusted networks
  • Enforce least privilege access controls and monitor for suspicious authentication attempts

🔍 How to Verify

Check if Vulnerable:

Check ClickHouse version: SELECT version(); If version is earlier than 19.14.3.3, system is vulnerable.

Check Version:

SELECT version();

Verify Fix Applied:

After patching, verify version is 19.14.3.3 or later: SELECT version();

📡 Detection & Monitoring

Log Indicators:

  • Multiple authentication failures followed by service crashes
  • Unusual client connections from unexpected sources
  • ClickHouse service restart logs indicating crashes

Network Indicators:

  • Unusual traffic patterns to ClickHouse port (default 9000)
  • Multiple connection attempts from single source

SIEM Query:

source="clickhouse.log" AND ("segmentation fault" OR "stack overflow" OR "service crashed")

🔗 References

📤 Share & Export