Sploitus

Exploit for Code Injection in Flowiseai Flowise

githubexploit · 2026-08-09

Exploit Code

README70 lines
## https://sploitus.com/exploit?id=325FA034-4B06-54ED-A58E-FA9E0D332762
# CVE-2025-59528 Educational PoC

> **Educational use only.** This project is intended for controlled security research, classroom demonstrations, and authorized testing in an isolated lab. Do not use it against systems, networks, applications, or accounts that you do not own or have explicit permission to test.

## What this PoC demonstrates

This proof of concept demonstrates how an improperly handled `mcpServerConfig` value may allow server-side JavaScript evaluation and command execution through the `customMCP` node-load functionality.

The script supports two authentication methods:

- **Email/password:** authenticates through the application's login endpoint and reuses the returned session cookies.
- **Bearer token:** sends an API key in the `Authorization` header.

After authentication, the script submits a crafted configuration to `/api/v1/node-load-method/customMCP`. The payload uses Node.js child-process functionality to execute a shell command and connect back to a listener controlled by the researcher. This behavior is included only to demonstrate the potential impact in an authorized lab environment.

## Requirements

- Python 3.
- The `requests` package.

Install the dependency with:

```bash
python3 -m pip install requests
```

## Usage

Save the script as `CVE-2025-59528.py`.

### Email and password mode

```bash
python3 CVE-2025-59528.py     
```

Example with documentation-only values:

```bash
python3 CVE-2025-59528.py researcher@example.test 'REDACTED_PASSWORD' lab.example.test 192.0.2.10 4444
```

### Bearer-token mode

```bash
python3 CVE-2025-59528.py    
```

Example with documentation-only values:

```bash
python3 CVE-2025-59528.py 'REDACTED_API_KEY' lab.example.test 192.0.2.10 4444
```

The script expects these application routes to be available:

- `/api/v1/auth/login`
- `/api/v1/node-load-method/customMCP`

The current script constructs `http://` URLs. Update the implementation for HTTPS when testing a lab deployment that requires TLS.

## How the code works

1. `main()` validates the command-line argument count and selects the authentication mode.
2. `login()` sends the supplied credentials to the login endpoint.
3. `tokens()` extracts the session values from the `Set-Cookie` response header.
4. `shell()` builds the authenticated request and submits the crafted `mcpServerConfig` value.
5. `bearer()` performs the same request using a bearer token instead of session cookies.
6. The response body is printed so the researcher can correlate the result with application and server logs.