Description
Aerospike Community Edition 4.9.0.5 allows for unauthenticated submission and execution of user-defined functions (UDFs), written in Lua, as part of a database query. It attempts to restrict code execution by disabling os.execute() calls, but this is insufficient. Anyone with network access can use a crafted UDF to execute arbitrary OS commands on all nodes of the cluster at the permission level of the user running the Aerospike service.
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Aerospike Database UDF Lua Code Execution
exploit/linux/misc/aerospike_database_udf_cmd_exec
Exploit-DB 1
- Aerospike Database 5.1.0.3 - OS Command Execution EDB-49067 · remote · Nov 17, 2020
GitHub 2 repositories
-
b4ny4n/CVE-2020-13151 ★ 43 · Aug 1, 2020
POC for CVE-2020-13151
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
References
- https://www.aerospike.com/docs/operations/configure/security/access-control/index.html#create-users-and-assign-roles
- https://b4ny4n.github.io/network-pentest/2020/08/01/cve-2020-13151-poc-aerospike.html
- https://www.aerospike.com/download/server/notes.html#5.1.0.3
- https://www.aerospike.com/enterprise/download/server/notes.html#5.1.0.3
- http://packetstormsecurity.com/files/160106/Aerospike-Database-5.1.0.3-Remote-Command-Execution.html
- http://packetstormsecurity.com/files/160451/Aerospike-Database-UDF-Lua-Code-Execution.html