CVE-2020-24719

9.8 CRITICAL

📋 TL;DR

CVE-2020-24719 is a critical vulnerability in Couchbase Server where the Erlang magic cookie (authentication secret) can be exposed in logs. Attackers who obtain this cookie can connect to Erlang nodes and execute arbitrary operating system commands with the privileges of the Erlang process. This affects organizations running vulnerable versions of Couchbase Server.

💻 Affected Systems

Products:
  • Couchbase Server
Versions: 6.5.1 and earlier versions
Operating Systems: All platforms running Couchbase Server
Default Config Vulnerable: ⚠️ Yes
Notes: Any configuration where Erlang cookie logging occurs is vulnerable. The cookie may appear in various log files depending on configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise allowing attackers to execute arbitrary OS commands, potentially leading to data theft, ransomware deployment, or complete system takeover.

🟠

Likely Case

Attackers gaining unauthorized access to the Couchbase Server system, potentially accessing sensitive data and using the system as a foothold for lateral movement.

🟢

If Mitigated

Limited impact if proper network segmentation, log protection, and access controls prevent attackers from accessing logs or connecting to Erlang nodes.

🌐 Internet-Facing: HIGH - If Couchbase Server is internet-facing and logs are accessible, attackers can easily obtain the cookie and execute commands.
🏢 Internal Only: MEDIUM - Internal attackers or compromised systems could access logs and exploit this vulnerability for lateral movement.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires obtaining the magic cookie from logs first, then using standard Erlang distribution protocol tools to connect and execute commands.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 6.6.0 and later

Vendor Advisory: https://www.couchbase.com/resources/security#VulnerabilityReporting

Restart Required: Yes

Instructions:

1. Backup Couchbase Server configuration and data. 2. Download Couchbase Server 6.6.0 or later from official sources. 3. Stop Couchbase Server services. 4. Install the updated version following vendor documentation. 5. Restart Couchbase Server services. 6. Verify the upgrade was successful.

🔧 Temporary Workarounds

Restrict Log Access

linux

Prevent unauthorized access to Couchbase Server log files that may contain the Erlang cookie.

chmod 600 /opt/couchbase/var/lib/couchbase/logs/*
chown couchbase:couchbase /opt/couchbase/var/lib/couchbase/logs/*

Network Segmentation

all

Restrict network access to Erlang distribution ports (typically 4369/tcp and range 21100-21299/tcp) to trusted systems only.

🧯 If You Can't Patch

  • Implement strict access controls on log directories to prevent unauthorized viewing of logs containing the Erlang cookie.
  • Configure firewall rules to block all inbound connections to Erlang distribution ports from untrusted networks.

🔍 How to Verify

Check if Vulnerable:

Check Couchbase Server version: if version is 6.5.1 or earlier, the system is vulnerable. Also check log files for exposure of the Erlang cookie value.

Check Version:

couchbase-server --version

Verify Fix Applied:

Verify Couchbase Server version is 6.6.0 or later using the version check command. Confirm Erlang cookie no longer appears in logs.

📡 Detection & Monitoring

Log Indicators:

  • Log entries containing 'cookie' or 'setcookie' with what appears to be a secret value
  • Unauthorized connection attempts to Erlang distribution ports

Network Indicators:

  • Unexpected connections to TCP port 4369 or ports in range 21100-21299
  • Erlang distribution protocol traffic from untrusted sources

SIEM Query:

source="couchbase.log" AND "cookie" OR source="couchbase.log" AND "setcookie"

🔗 References

📤 Share & Export