Code injection by API api/v1/validate/code
which can lead to code execution
#696
Labels
api/v1/validate/code
which can lead to code execution
#696
Describe the bug
As defined in the source code, API
validate/code
validate the code and give the validation result. While the functionexec
is used when facing the condition thatisinstance(node, ast.FunctionDef)
, after going into this branch, exec will be called.But we can trigger the
exec
by using the default parameter of a function which can lead to code execution.While this API is the public API, so if a service is running on a public server, attacker can do RCE by calling the API, giving a part of code to execute the code remotely, even reverse a shell.
To Reproduce
Here is the PoC:
Shell Log
The text was updated successfully, but these errors were encountered: