An attacker with sufficient privileges to execute SQL queries can exploit a Remote Code Execution (RCE) vulnerability through User-Defined Functions (UDF) in Risingwave. By crafting a malicious UDF in Python, the attacker can execute arbitrary system commands on any compute nodes.
The root cause of this issue is the lack of proper isolation and sanitization in the execution environment for Python UDFs (https://github.com/arrow-udf/arrow-udf/blob/main/arrow-udf-python/src/interpreter.rs#L37-L73). Attackers can abuse this to escalate their privileges from SQL execution to direct system-level access.
Execute following SQL: