
Proof-of-concept exploit for CVE-2026-30345, an arbitrary file write in CTFd backup import, enabling persistent backdoor via .bashrc.
Arbitrary file write vulnerability in CTFd < 3.8.2 backup import functionality.
Make sure to update the values accordingly for your exploit. Values such as RHOST, ATTACKER IP or PORT, and the credentials used for the exploitation.
python cve_2026_30345_bashrc_poc.py
Problem: You didn't include a legitimate db/ export.
Solution: Export from your CTFd instance first (see Step 1).
Problem: You used a db/ folder from a different CTFd version.
Solution: Export from the EXACT CTFd instance you're testing.
Problem: Admin hasn't opened a new shell yet.
Solution: Force trigger in development environment:
docker exec -it ctfd bash
The .bashrc runs immediately when bash starts.
This proof of concept is provided for educational and authorized security testing purposes only. Unauthorized access to computer systems is illegal. Use only on systems you own or have explicit written permission to test.