
Jenkins CLI arbitrary file read (CVE-2024-23897)
Idea: Jenkins ≤ 2.441 (LTS ≤ 2.426.2) expands @/path inside CLI args.
Unauthenticated users can make Jenkins read local files and reflect their first lines via the CLI help output.
Fixed in 2.442 / 2.426.3.
# 1) Build
docker build -t day3-jenkins-23897 .
# 2) Run
docker rm -f day3 2>/dev/null || true
docker run -d --name day3 -p 8080:8080 day3-jenkins-23897
# 3) Wait ~30–60s (first boot). Check:
curl -I http://127.0.0.1:8080/login | head -n 1
! If you stuck you can use ./exploit.sh (after the container is running)