CVE-2023-36667

7.5 HIGH

📋 TL;DR

CVE-2023-36667 is a directory traversal vulnerability in Couchbase Server that allows attackers to access files outside the intended directory. This affects Couchbase Server versions 7.1.4 before 7.1.5 and 7.2.0 before 7.2.1. Attackers could potentially read sensitive files on the server.

💻 Affected Systems

Products:
  • Couchbase Server
Versions: 7.1.4 before 7.1.5, 7.2.0 before 7.2.1
Operating Systems: All supported platforms
Default Config Vulnerable: ⚠️ Yes
Notes: All deployments running affected versions are vulnerable regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could read sensitive configuration files, credentials, or other critical system files, potentially leading to full system compromise.

🟠

Likely Case

Unauthorized reading of application files, configuration data, or other files accessible to the Couchbase process.

🟢

If Mitigated

Limited impact with proper file permissions and network segmentation in place.

🌐 Internet-Facing: HIGH - Directory traversal vulnerabilities on internet-facing systems are frequently targeted and can lead to significant data exposure.
🏢 Internal Only: MEDIUM - Still concerning for internal systems but requires network access and reduces external attack surface.

🎯 Exploit Status

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

Directory traversal vulnerabilities typically have low exploitation complexity and may not require authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 7.1.5 or 7.2.1

Vendor Advisory: https://docs.couchbase.com/server/current/release-notes/relnotes.html

Restart Required: Yes

Instructions:

1. Backup your Couchbase configuration and data. 2. Download and install Couchbase Server version 7.1.5 or 7.2.1 from the official website. 3. Follow the upgrade documentation for your deployment type. 4. Restart the Couchbase service after installation.

🔧 Temporary Workarounds

Network Segmentation

linux

Restrict network access to Couchbase Server to only trusted sources

iptables -A INPUT -p tcp --dport 8091 -s trusted_ip -j ACCEPT
iptables -A INPUT -p tcp --dport 8091 -j DROP

File Permission Hardening

linux

Restrict file permissions for Couchbase process to limit potential file access

chmod 750 /opt/couchbase/var/lib/couchbase/data
chown -R couchbase:couchbase /opt/couchbase

🧯 If You Can't Patch

  • Implement strict network access controls to limit who can reach the Couchbase Server
  • Apply principle of least privilege to Couchbase service account and file permissions

🔍 How to Verify

Check if Vulnerable:

Check Couchbase Server version: curl -s http://localhost:8091/pools | grep -o '"version":"[^"]*"'

Check Version:

couchbase-server --version 2>/dev/null || grep version /opt/couchbase/VERSION.txt

Verify Fix Applied:

Verify version is 7.1.5 or higher for 7.1.x branch, or 7.2.1 or higher for 7.2.x branch

📡 Detection & Monitoring

Log Indicators:

  • Unusual file access patterns in Couchbase logs
  • Requests with directory traversal sequences (../, ..\) in access logs

Network Indicators:

  • Unusual HTTP requests to Couchbase REST API with path traversal patterns

SIEM Query:

source="couchbase.log" AND ("..\" OR "../" OR "%2e%2e" OR "%252e%252e")

🔗 References

📤 Share & Export