CVE-2020-29050

7.5 HIGH

📋 TL;DR

This CVE describes a directory traversal vulnerability in SphinxSearch that allows attackers to read arbitrary files on the server. When combined with CVE-2019-14511, the mysql client can be used with CALL SNIPPETS and load_file operations to access files outside the intended directory (e.g., /etc/passwd). This affects SphinxSearch installations through version 3.1.1.

💻 Affected Systems

Products:
  • SphinxSearch
  • Sphinx Technologies Sphinx
Versions: through 3.1.1
Operating Systems: Linux, Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: Requires mysql client access and interaction with CVE-2019-14511 for full exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers can read sensitive system files (passwords, configuration files, SSH keys) leading to complete system compromise and lateral movement.

🟠

Likely Case

Unauthorized file disclosure of configuration files, potentially exposing credentials and system information.

🟢

If Mitigated

Limited impact with proper network segmentation and file permission restrictions.

🌐 Internet-Facing: HIGH - Internet-facing SphinxSearch instances are directly exploitable without authentication.
🏢 Internal Only: MEDIUM - Internal instances still vulnerable but require internal network access.

🎯 Exploit Status

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

Exploitation is straightforward using mysql client commands with CALL SNIPPETS and load_file operations.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after 3.1.1

Vendor Advisory: https://security-tracker.debian.org/tracker/CVE-2020-29050

Restart Required: Yes

Instructions:

1. Upgrade SphinxSearch to version after 3.1.1. 2. Restart the SphinxSearch service. 3. Verify the fix by testing the vulnerability.

🔧 Temporary Workarounds

Restrict mysql client access

linux

Limit network access to SphinxSearch mysql interface to trusted IPs only

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

File system restrictions

linux

Run SphinxSearch with minimal file system permissions using chroot or containerization

chroot /var/sphinx /usr/bin/searchd --config /etc/sphinx/sphinx.conf

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate SphinxSearch instances
  • Apply file system permissions to restrict SphinxSearch process from accessing sensitive directories

🔍 How to Verify

Check if Vulnerable:

Check SphinxSearch version: searchd --version. If version is 3.1.1 or earlier, system is vulnerable.

Check Version:

searchd --version

Verify Fix Applied:

After patching, attempt to exploit using mysql client with CALL SNIPPETS on a known sensitive file path.

📡 Detection & Monitoring

Log Indicators:

  • Unusual mysql client connections to port 9306
  • CALL SNIPPETS operations with file paths
  • Failed file access attempts in system logs

Network Indicators:

  • Unexpected traffic to SphinxSearch mysql port (9306) from untrusted sources
  • Patterns of file path traversal in network packets

SIEM Query:

source="sphinx.log" AND ("CALL SNIPPETS" OR "load_file") AND (".." OR "/etc" OR "/root")

🔗 References

📤 Share & Export