Skip to content
Verified reproduction

CVE-2026-60004: Gitea diffpatch Git hook installation leads to remote code execution

CVE-2026-60004 is verified against go-gitea/gitea · github affected versions: >=1.17, <1.27.1 fixed version: 1.27.1 vulnerability class: RCE This critical reproduction includes runnable sandbox proof, artifacts, and a plain-text agent view under REPRO-2026-00312.

REPRO-2026-00312 go-gitea/gitea · github RCE Jul 29, 2026 CVE entry .txt
Severity CRITICAL
Confidence HIGH
Reproduced in 30m 6s
Tool calls 243
Spend $3.49
Affected >=1.17, <1.27.1
Fixed in 1.27.1
$ pruva-verify REPRO-2026-00312
or curl -O https://pruva.dev/api/v1/reproductions/REPRO-2026-00312/artifacts/bundle/repro/reproduction_steps.sh && chmod +x reproduction_steps.sh && ./reproduction_steps.sh
Run in a VM or disposable container. This exploits a real vulnerability.
02 · The vulnerability

GHSA-rcr6-4jqh-j84m describes a critical remote code execution issue in Gitea's diffpatch Git hook installation path. In affected versions >=1.17 and <1.27.1, attacker-controlled patch application in services/repository/files/patch.go can create a repository path collision that causes Git's fallback checkout to install an executable hook file such as hooks/post-index-change inside a shared bare temporary clone. When Git later writes the index, the hook executes as the Gitea OS user. If open registration is enabled, this can be reached by an unauthenticated attacker who creates an account and then a repository. Fixed in 1.27.1.

03 · Root cause
04 · Reproduction transcript

The agent's step-by-step process — every tool call, every handoff, the moment the exploit fired.

Loading session...

05 · Artifacts

Scripts, logs, diffs, and output captured during the reproduction.