Add Flowise CSV Agent Prompt Injection RCE module (CVE-2026-41264)#21407
Add Flowise CSV Agent Prompt Injection RCE module (CVE-2026-41264)#21407Takahiro-Yoko wants to merge 6 commits into
Conversation
| version = flowise_get_version | ||
| return CheckCode::Unknown('Could not retrieve Flowise version.') unless version | ||
|
|
||
| return CheckCode::Appears("Flowise version #{version} detected") if version <= Rex::Version.new('3.0.13') |
There was a problem hiding this comment.
Is there a lower bound?
There was a problem hiding this comment.
Thanks! Although this has not been explicitly tested (yet), there appears to be no lower bound.
| fail_with(Failure::Unknown, 'Failed to create a chatflow.') unless res.code == 200 | ||
| @id = res.get_json_document['id'] | ||
|
|
||
| send_request_cgi({ |
There was a problem hiding this comment.
Do we need to check the response here?
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
| register_options([ | ||
| OptString.new('APIKEY', [true, 'Flowise API Key (chatflows:create permission required)', '']), | ||
| OptString.new('OLLAMAAPIURI', [ true, 'Endpoint of the OLLAMA API controlled by an attacker', '' ]), | ||
| OptString.new('MODEL', [ true, 'Valid ollama model name', '' ]), |
There was a problem hiding this comment.
If it can be nil, does it have to be mandatory?
There was a problem hiding this comment.
Good catch. I didn't realize that setting an empty string as the default value bypasses the required option check. These options are all mandatory, so I've removed the default empty values. 45394b3 Thanks!
|
|
||
| register_options([ | ||
| OptString.new('APIKEY', [true, 'Flowise API Key (chatflows:create permission required)', '']), | ||
| OptString.new('OLLAMAAPIURI', [ true, 'Endpoint of the OLLAMA API controlled by an attacker', '' ]), |
There was a problem hiding this comment.
Is there a way to spoof the traffic between Ollama and Flowise? Asking because it might make module more usable and currently getting this error:
Error: predictionsServices.buildChatflow - fetch failed
There was a problem hiding this comment.
I haven't tested traffic spoofing between Ollama and Flowise, but standard interception/proxy tools may work.
Regarding the predictionsServices.buildChatflow - fetch failed error, please make sure that OLLAMAAPIURI includes the correct Ollama host and port. Since Ollama uses port 11434 by default, you may need to set it to:
http://<your_ollama_server_ip>:11434
For troubleshooting, it may also help to temporarily comment out the cleanup code so that you can inspect the created resources after the module runs.

Then:
- Open Flowise.
- Verify that the chatflow was created successfully.
3. Check the chatflow configuration and confirm that the Ollama endpoint is set as expected.


CVE-2026-41264
GHSA-3hjv-c53m-58jj
Vulnerable Application
This vulnerability allows remote attackers to execute arbitrary code on affected installations of FlowiseAI Flowise.
Authentication is not required to exploit this vulnerability.
The specific flaw exists within the run method of the CSV_Agents class.
The issue results from the lack of proper sandboxing when evaluating an LLM generated python script.
An attacker can leverage this vulnerability to execute code in the context of the user running the server.
The vulnerability affects:
This module was successfully tested on:
Installation
docker run --name flowise -p 3000:3000 flowiseai/flowise:3.0.13On an attacker machineCreate API Key (need chatflows:create permission for exploit to work)Verification Steps
use exploit/multi/http/flowise_auth_rce_cve_2026_41264.rbrun lhost=<lhost> rhost=<rhost> apikey=<apikey> ollamaapiuri=<ollamaapiuri> model=<model>Scenarios
cmd/linux/http/x64/meterpreter_reverse_tcp