Skip to main content
Mallory
CriticalPublic exploitVulnerability

CVE-2020-13151: Remote Command Execution via Lua UDF in Aerospike Community Edition

Published Aug 5, 2020 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS9.8Critical · v3.1
EPSS86.5%100th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendor
Aerospike
IdentifiersCVE-2020-13151CWE-78 · Improper Neutralization of Special…

CVE-2020-13151 is a critical vulnerability in Aerospike Community Edition (prior to 4.9.0.10 and 5.0.0.7) that allows unauthenticated remote attackers to submit and execute arbitrary Lua user-defined functions (UDFs) as part of a database query. The vulnerability arises from insufficient blacklisting of dangerous Lua functions: while os.execute() was blocked, io.popen() was not, enabling attackers to execute arbitrary OS commands on all cluster nodes with the privileges of the Aerospike service account. The community edition's lack of authentication further exacerbates the risk, making exploitation trivial for anyone with network access.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows unauthenticated attackers to execute arbitrary commands on all Aerospike cluster nodes, potentially leading to full system compromise, lateral movement within the network, data exfiltration, or installation of persistent malware. The availability of a public exploit increases the risk of widespread exploitation, especially for internet-exposed instances.

Mitigation

If you can’t patch tonight, do this now.

As immediate mitigation, restrict network access to Aerospike servers using firewalls or network ACLs to trusted hosts only. Disable Lua UDFs if not required. For enterprise edition users, enforce strong authentication and minimize service account privileges. Monitor for suspicious UDF submissions and command execution activity.

Remediation

Patch, then assume compromise.

Upgrade Aerospike Community Edition to at least 4.9.0.10, 5.0.0.7, or preferably 5.1.0.3 or later. These versions allow disabling Lua UDFs and block process creation functions (such as io.popen) in UDFs. Apply all relevant patches as soon as possible.

Public exploits

Exploits

3 exploits validated by Mallory's analysis. Hidden: 1 not yet analyzed, such as Exploit-DB entries.

View more in app →
aerospike_database_udf_cmd_exec.rbThis repository contains a single Metasploit module (modules/exploits/linux/misc/aerospike_database_udf_cmd_exec.rb) that exploits CVE-2020-13151, a remote code execution vulnerability in Aerospike Database Community Edition versions prior to 5.1.0.3. The vulnerability arises from the ability to upload and execute Lua UDFs that can call os.execute, allowing arbitrary command execution as the Aerospike service user. The module connects to the Aerospike service (default TCP port 3000), uploads a malicious Lua UDF, and triggers it to execute attacker-supplied commands or payloads. It supports both direct command execution and staged payloads (e.g., Meterpreter reverse shell). The exploit is weaponized, as it is part of the Metasploit framework and supports customizable payloads. The only code file is written in Ruby and is structured according to Metasploit conventions, with clear methods for checking vulnerability, uploading/removing UDFs, and executing payloads. The main fingerprintable endpoints are the Aerospike service port (3000/tcp) and the UDF Lua directory on the target system.Disclosed Jul 31, 2020 · Framework: metasploit · ruby · networkWeaponizedCVE-2020-13151This repository provides a working exploit for CVE-2020-13151, a command execution vulnerability in Aerospike Database versions prior to 5.1.0.3. The exploit consists of three main files: a Python script (cve2020-13151.py) for automated exploitation, a Lua script (poc.lua) that acts as a malicious User Defined Function (UDF) to execute arbitrary shell commands, and a shell script (run-poc.sh) to set up a vulnerable Aerospike environment using Docker. The Python script connects to the Aerospike server, checks its version, registers the malicious UDF, and then triggers command execution, supporting both arbitrary shell commands and reverse shell payloads (Python or netcat-based). The Lua UDF leverages io.popen to bypass restrictions on os.execute and can be used interactively or via the Python script. The exploit requires access to the Aerospike server with sufficient privileges to register and execute UDFs. The repository is well-structured for both manual and automated exploitation and demonstrates the vulnerability's impact by allowing full command execution on the target server.b4ny4n · Disclosed Aug 1, 2020 · python · lua · networkOperationalCVE-2020-13151-POC-Aerospike-Server-Host-Command-Execution-RCE-This repository provides a proof-of-concept (POC) exploit for CVE-2020-13151, a remote command execution vulnerability in Aerospike Server versions prior to 5.1.0.3. The exploit consists of two main files: 'exploit.py' (Python) and 'poc.lua' (Lua UDF). The Python script connects to a target Aerospike server, checks its version, populates a dummy record, registers the malicious Lua UDF, and then triggers arbitrary command execution via the UDF. The attacker can specify a custom command or use built-in reverse shell payloads (Python or netcat-based), requiring the attacker to provide a listening host and port. The Lua UDF leverages 'io.popen' to bypass restrictions on 'os.execute', allowing arbitrary shell command execution on the server. The exploit requires the attacker to have sufficient privileges to register and execute UDFs, or for the Aerospike cluster to have security disabled. The repository is structured as a typical POC, with a README, the main exploit script, and the UDF payload. Notable endpoints include the default Aerospike port (3000) and temporary files used for shell access.ByteMe1001 · Disclosed May 3, 2025 · python · lua · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
AerospikeAerospike Serverapplication
FAQ

Frequently asked questions

Is CVE-2020-13151 exploited in the wild?
As of Oct 16, 2026, Mallory has no reports of CVE-2020-13151 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2020-13151?
Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2020-13151, the earliest disclosed Jul 31, 2020.
Is there a patch for CVE-2020-13151?
Upgrade Aerospike Community Edition to at least 4.9.0.10, 5.0.0.7, or preferably 5.1.0.3 or later. These versions allow disabling Lua UDFs and block process creation functions (such as io.popen) in UDFs.
What products are affected by CVE-2020-13151?
Aerospike Server.
How severe is CVE-2020-13151?
CVE-2020-13151 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 86.5% (100th percentile) as of Oct 16, 2026.
Activity feed

Recent activity

No public activity tracked yet. Mallory keeps watching.

View more in app →

No public activity observed for this vulnerability.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.