CVE-2020-13151

9.8 CRITICAL

📋 TL;DR

CVE-2020-13151 allows unauthenticated remote attackers to execute arbitrary operating system commands on Aerospike database servers by submitting malicious Lua user-defined functions (UDFs). This affects Aerospike Community Edition installations with default configurations that are exposed to network access. Attackers can compromise all nodes in the cluster with the permissions of the Aerospike service account.

💻 Affected Systems

Products:
  • Aerospike Community Edition
Versions: Up to and including 4.9.0.5
Operating Systems: All platforms running Aerospike
Default Config Vulnerable: ⚠️ Yes
Notes: Community Edition defaults to no authentication. Enterprise Edition with proper authentication configured may be less vulnerable but should still be patched.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete cluster compromise leading to data theft, service disruption, and lateral movement to other systems in the environment.

🟠

Likely Case

Remote code execution leading to data exfiltration, cryptocurrency mining, or ransomware deployment on database servers.

🟢

If Mitigated

Limited impact if proper network segmentation and access controls prevent external access to Aerospike ports.

🌐 Internet-Facing: HIGH - Unauthenticated RCE with public exploit code makes internet-exposed systems immediate targets.
🏢 Internal Only: HIGH - Even internally, any compromised host or malicious insider can exploit this vulnerability.

🎯 Exploit Status

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

Multiple public proof-of-concept exploits exist that demonstrate complete RCE. The vulnerability is trivial to exploit with basic Lua knowledge.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.1.0.3 and later

Vendor Advisory: https://www.aerospike.com/download/server/notes.html#5.1.0.3

Restart Required: Yes

Instructions:

1. Download Aerospike Server version 5.1.0.3 or later from official site. 2. Stop Aerospike service. 3. Backup configuration and data. 4. Install new version. 5. Restart Aerospike service. 6. Verify functionality.

🔧 Temporary Workarounds

Enable Authentication

all

Configure Aerospike to require authentication for all connections

# Edit aerospike.conf
# Add: service { enable-security true }
# Create users with appropriate roles

Network Access Control

linux

Restrict network access to Aerospike ports (default 3000, 3001, 3002, 3003)

# Example iptables rule
iptables -A INPUT -p tcp --dport 3000:3003 -s trusted_ip_range -j ACCEPT
iptables -A INPUT -p tcp --dport 3000:3003 -j DROP

🧯 If You Can't Patch

  • Implement strict network segmentation - only allow trusted applications to connect to Aerospike ports
  • Enable and enforce authentication with strong credentials and minimal necessary permissions

🔍 How to Verify

Check if Vulnerable:

Check Aerospike version: if version is 4.9.0.5 or earlier, system is vulnerable. Test by attempting to register a Lua UDF without authentication.

Check Version:

asinfo -v "build"

Verify Fix Applied:

Verify Aerospike version is 5.1.0.3 or later. Attempt to register a Lua UDF without authentication should fail.

📡 Detection & Monitoring

Log Indicators:

  • Unexpected UDF registration attempts
  • Failed authentication attempts from unknown sources
  • Unusual process execution from Aerospike service account

Network Indicators:

  • Unusual outbound connections from Aerospike servers
  • Traffic to Aerospike ports from unauthorized sources
  • Large data transfers from database servers

SIEM Query:

source="aerospike.log" AND ("register" OR "UDF" OR "lua") AND NOT user="authenticated_user"

🔗 References

📤 Share & Export