Gitea diffpatch git hook RCE
CVE-2026-60004 is a code injection in Gitea: the diffpatch API applies patches in a bare clone, and an add/add collision through the git apply -3 fallback lets a registered user check a file into the repository's live hooks directory. Git executes the hook on the next index update; CVSS 9.8 and CISA KEV listed.
How to reach it
Run the challenge locally with its docker-compose. The flagger sidecar writes your per-run flag to /flag/flag.txt inside the container, readable by the git user. Gitea listens on port 8080 with open registration; the diffpatch API is the entry point.
Run this challenge
Spin it up locally with Docker. The flagger sidecar fetches a per-run flag into a shared volume, then the challenge container boots and reads it.
services:
flagger:
image: matejbasic/rootcause-flagger:1.0
environment:
ROOTCAUSE_API_URL: https://root-cause-api.matejbasic.com
ROOTCAUSE_API_KEY: ${ROOTCAUSE_API_KEY}
ROOTCAUSE_CHALLENGE: gitea-diffpatch-hook
FLAG_PATH: /flag/flag.txt
volumes:
- flag:/flag
challenge:
image: matejbasic/cve-2026-60004:1.0
depends_on:
flagger:
condition: service_completed_successfully
environment:
FLAG_PATH: /flag/flag.txt
volumes:
- flag:/flag
ports:
- "8080:8080"
volumes:
flag:
rootcause start gitea-diffpatch-hookThe rootcause CLI does all of this in one command. Running a challenge needs your API key, which you generate in your profile.