Gitea
Gitea Code Injection Vulnerability
Gitea before 1.27.1 allows remote code execution via the diffpatch API through Git hook installation.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 1.17, < 1.27.1
Fixed in 1.27.1
Mitigation
Upgrade Gitea to 1.27.1 or later.
References
- Vendor advisory github.com/go-gitea/gitea/security/advisories/…
Timeline
Days relative to CVE publicationFirst public PoC 27 days before publication; added to CISA KEV 1 day before publication. First PoC: EQSTLab/CVE-2026-60004 (created 30 Jul 2026, found by us: backfilled).
PoC repositories
Found on GitHub.13 PoCs · 1 suspicious or fake
PoCs 13
| Repository | Created | Found by us | Stars | Assessment |
|---|---|---|---|---|
| EQSTLab/CVE-2026-60004 | 30 Jul 2026 −27 d | backfilled | 1 | PoC |
| 0xBlackash/CVE-2026-60004 | 30 Jul 2026 −27 d | backfilled | 6 | PoC |
| 0xredash/CVE-2026-60004 | 30 Jul 2026 −27 d | backfilled | 6 | PoC |
| ashrafzaryouh/CVE-2026-60004 | 30 Jul 2026 −27 d | backfilled | 6 | PoC |
| imbas007/CVE-2026-60004-POC | 3 Aug 2026 −23 d | backfilled | 17 | PoC |
| shinthink/CVE-2026-60004 | 3 Aug 2026 −23 d | backfilled | 0 | PoC |
| HackSpeak/CVE-2026-60004 | 4 Aug 2026 −22 d | backfilled | 2 | PoC
Flags · score 30
Below the suspicion threshold (50); does not change the assessment. |
| Sachinart/CVE-2026-60004-gitea-0day | 4 Aug 2026 −22 d | backfilled | 0 | PoC |
| gagaltotal/CVE-2026-60004-poc-gitea | 8 Aug 2026 −18 d | backfilled | 2 | PoC |
| yym8538/CVE-2026-60004 | 21 Aug 2026 −5.6 d | backfilled | 1 | PoC |
| fevar54/cve-2026-60004 | 25 Aug 2026 −1.1 d | backfilled | 0 | PoC |
| erberkan/CVE-2026-60004-PoC | 14 Sep 2026 +19 d | backfilled | 0 | PoC |
| basesixtythree/B63-POC-CVE-2026-60004 | 1 Nov 2026 +67 d | 14 Nov 2026 | 0 | PoC |
Suspicious or fake 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| HORKimhab/CVE-2026-60004 | 29 Jul 2026 −28 d | 5 | Fake |
Only PoCs count toward the first-PoC date and the characteristics below. "Backfilled" means we found the repository more than 30 days after it was created. Do not run PoC code from unknown sources.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| nuclei template | nuclei template: Gitea <= 1.27.0 - Pre-Auth Remote Code Execution | 3 Aug 2026 | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 13 PoC reposGET /api/v1/version
- Key headers
Accept: application/json- Ports
- 3000, 8080, 8888
- PoC User-Agent
CVE-2026-60004-poc/1.0 (0xBlackash)gitea-rce-poc/2.0- Seen in
- 7 repos: 0xBlackash/CVE-2026-60004, 0xredash/CVE-2026-60004, HackSpeak/CVE-2026-60004, ashrafzaryouh/CVE-2026-60004, fevar54/cve-2026-60004, imbas007/CVE-2026-60004-POC, shinthink/CVE-2026-60004
- Evidence
- 0xBlackash/CVE-2026-60004/CVE-2026-60004.py:261 0xredash/CVE-2026-60004/CVE-2026-60004.py:261 HackSpeak/CVE-2026-60004/gitea_diffpatch_rce_poc.py:239 ashrafzaryouh/CVE-2026-60004/CVE-2026-60004.py:261 fevar54/cve-2026-60004/detector.py:42 fevar54/cve-2026-60004/exploit.py:368
POST /user/sign_up
- Key headers
Accept: text/html- Body markers
_csrf=user_name=email=password=retype=user_name=poc_inapplication/x-www-form-urlencoded- Ports
- 3000, 3001, 8080, 8888
- PoC User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36- Seen in
- 5 repos: Sachinart/CVE-2026-60004-gitea-0day, basesixtythree/B63-POC-CVE-2026-60004, fevar54/cve-2026-60004, imbas007/CVE-2026-60004-POC, shinthink/CVE-2026-60004
- Evidence
- Sachinart/CVE-2026-60004-gitea-0day/poc.py:121 basesixtythree/B63-POC-CVE-2026-60004/b63_probe.py:74 basesixtythree/B63-POC-CVE-2026-60004/exploit_opt.py:77 basesixtythree/B63-POC-CVE-2026-60004/exploit_readable.py:129 fevar54/cve-2026-60004/exploit.py:112 imbas007/CVE-2026-60004-POC/CVE-2026-60004.yaml:94
GET /user/sign_up
- Key headers
Accept: text/htmlAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8- Ports
- 3000, 8080, 8888
- PoC User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36- Seen in
- 4 repos: Sachinart/CVE-2026-60004-gitea-0day, fevar54/cve-2026-60004, imbas007/CVE-2026-60004-POC, shinthink/CVE-2026-60004
- Evidence
- Sachinart/CVE-2026-60004-gitea-0day/poc.py:107 fevar54/cve-2026-60004/detector.py:98 fevar54/cve-2026-60004/exploit.py:85 fevar54/cve-2026-60004/exploit.py:95 imbas007/CVE-2026-60004-POC/CVE-2026-60004.yaml:68 imbas007/CVE-2026-60004-POC/cve-2026-60004-poc.py:296
POST /api/v1/repos/{var}/{var}/diffpatch
- Key headers
Accept: application/jsonAuthorization: Basic {var}- Body markers
"content""message""branch":"main""sha""message":"apply-1""message":"apply-2"inapplication/json- Ports
- 3000, 8080, 8888
- PoC User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36- Seen in
- 4 repos: Sachinart/CVE-2026-60004-gitea-0day, fevar54/cve-2026-60004, imbas007/CVE-2026-60004-POC, shinthink/CVE-2026-60004
- Evidence
- Sachinart/CVE-2026-60004-gitea-0day/poc.py:157 fevar54/cve-2026-60004/exploit.py:188 imbas007/CVE-2026-60004-POC/CVE-2026-60004.yaml:155 imbas007/CVE-2026-60004-POC/cve-2026-60004-poc.py:427 shinthink/CVE-2026-60004/cve_2026_60004.py:645 shinthink/CVE-2026-60004/cve_2026_60004.py:668
POST /api/v1/user/repos
- Key headers
Accept: application/jsonAuthorization: Basic {var}- Body markers
"name""private""auto_init""default_branch":"main"inapplication/json- Ports
- 3000, 8080, 8888
- PoC User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36- Seen in
- 4 repos: Sachinart/CVE-2026-60004-gitea-0day, fevar54/cve-2026-60004, imbas007/CVE-2026-60004-POC, shinthink/CVE-2026-60004
- Evidence
- Sachinart/CVE-2026-60004-gitea-0day/poc.py:139 fevar54/cve-2026-60004/exploit.py:131 imbas007/CVE-2026-60004-POC/CVE-2026-60004.yaml:113 imbas007/CVE-2026-60004-POC/cve-2026-60004-poc.py:360 shinthink/CVE-2026-60004/cve_2026_60004.py:566
GET /api/v1/repos/{var}/{var}/raw/proof
- Query
ref=rce-proof- Key headers
Authorization: Basic {var}- Ports
- 3000, 8080
- PoC User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36- Seen in
- 3 repos: Sachinart/CVE-2026-60004-gitea-0day, fevar54/cve-2026-60004, imbas007/CVE-2026-60004-POC
- Evidence
- Sachinart/CVE-2026-60004-gitea-0day/poc.py:197 fevar54/cve-2026-60004/exploit.py:247 imbas007/CVE-2026-60004-POC/CVE-2026-60004.yaml:200 imbas007/CVE-2026-60004-POC/cve-2026-60004-poc.py:518
GET /api/v1/user
- Key headers
Accept: application/jsonAuthorization: Basic {var}- Ports
- 3000, 8080
- Seen in
- 3 repos: Sachinart/CVE-2026-60004-gitea-0day, fevar54/cve-2026-60004, imbas007/CVE-2026-60004-POC
- Evidence
- Sachinart/CVE-2026-60004-gitea-0day/poc.py:130 fevar54/cve-2026-60004/exploit.py:418 fevar54/cve-2026-60004/exploit.py:436 imbas007/CVE-2026-60004-POC/cve-2026-60004-poc.py:791 imbas007/CVE-2026-60004-POC/cve-2026-60004-poc.py:814
GET /api/v1/repos/{var}/{var}/branches/main
- Key headers
Accept: application/jsonAuthorization: Basic {var}- Ports
- 3000, 8080
- PoC User-Agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36- Seen in
- 2 repos: Sachinart/CVE-2026-60004-gitea-0day, imbas007/CVE-2026-60004-POC
- Evidence
- Sachinart/CVE-2026-60004-gitea-0day/poc.py:149 imbas007/CVE-2026-60004-POC/CVE-2026-60004.yaml:131
GET /api/v1/repos/{var}/{var}/branches/{var}
- Key headers
Accept: application/jsonAuthorization: Basic {var}- Ports
- 3000, 8080
- Seen in
- 2 repos: fevar54/cve-2026-60004, imbas007/CVE-2026-60004-POC
- Evidence
- fevar54/cve-2026-60004/exploit.py:159 imbas007/CVE-2026-60004-POC/cve-2026-60004-poc.py:389
POST /api/v1/repos/{var}/{var}/raw/proof
- Query
ref=rce-proof- Key headers
Accept: application/jsonAuthorization: Basic {var}- Ports
- 3000, 8080
- Seen in
- 2 repos: fevar54/cve-2026-60004, imbas007/CVE-2026-60004-POC
- Evidence
- fevar54/cve-2026-60004/exploit.py:274 imbas007/CVE-2026-60004-POC/cve-2026-60004-poc.py:553
DELETE /api/v1/repos/{var}/{var}
- Ports
- 8888
- Seen in
- 1 repo: shinthink/CVE-2026-60004
- Evidence
- shinthink/CVE-2026-60004/cve_2026_60004.py:704
GET /api/healthz
GET /api/v1/repos/{var}/{var}/commits
- Query
limit=1- Ports
- 8888
- Seen in
- 1 repo: shinthink/CVE-2026-60004
- Evidence
- shinthink/CVE-2026-60004/cve_2026_60004.py:586
GET /api/v1/settings/api
- Ports
- 3000, 8080
- Seen in
- 1 repo: imbas007/CVE-2026-60004-POC
- Evidence
- imbas007/CVE-2026-60004-POC/cve-2026-60004-poc.py:753
GET /user/login
- Ports
- 8888
- Seen in
- 1 repo: shinthink/CVE-2026-60004
- Evidence
- shinthink/CVE-2026-60004/cve_2026_60004.py:533 shinthink/CVE-2026-60004/cve_2026_60004.py:723
GET /user/settings/account
- Ports
- 8888
- Seen in
- 1 repo: shinthink/CVE-2026-60004
- Evidence
- shinthink/CVE-2026-60004/cve_2026_60004.py:733
POST /api/v1/repos/test/test/diffpatch
- Key headers
Authorization: Basic {var}- Ports
- 3000, 8080
- Seen in
- 1 repo: fevar54/cve-2026-60004
- Evidence
- fevar54/cve-2026-60004/detector.py:110 fevar54/cve-2026-60004/detector.py:126 fevar54/cve-2026-60004/mitigator.py:66
POST /api/v1/user
- Body markers
"username":"x""email":"x@example.com""password":"B63lab!pass123"inapplication/json- Ports
- 3000
- Seen in
- 1 repo: basesixtythree/B63-POC-CVE-2026-60004
- Evidence
- basesixtythree/B63-POC-CVE-2026-60004/evidence/20-12-protocol-shape.txt:6
POST /user/login
- Body markers
user_name=poc_password=retype=email=_csrf=inapplication/x-www-form-urlencoded- Ports
- 8888
- Seen in
- 1 repo: shinthink/CVE-2026-60004
- Evidence
- shinthink/CVE-2026-60004/cve_2026_60004.py:543 shinthink/CVE-2026-60004/cve_2026_60004.py:728
POST /user/settings/account/delete
- Body markers
_csrf=password=inapplication/x-www-form-urlencoded- Ports
- 8888
- Seen in
- 1 repo: shinthink/CVE-2026-60004
- Evidence
- shinthink/CVE-2026-60004/cve_2026_60004.py:737
{VAR} /api/v1/repos/{var}/{var}/raw/b63-{var}.txt
- Query
ref=b63-- Ports
- 3000, 3001
- Seen in
- 1 repo: basesixtythree/B63-POC-CVE-2026-60004
- Evidence
- basesixtythree/B63-POC-CVE-2026-60004/exploit_readable.py:89
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/api/v1/version(?:[?#].*)?$
(?i)^/user/sign_up(?:[?#].*)?$
(?i)^/user/sign_up(?:[?#].*)?$
(?i)^/api/v1/repos/[^/?#]*/[^/?#]*/diffpatch(?:[?#].*)?$
(?i)^/api/v1/user/repos(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [3000,8080,8888] (msg:"GG PoC-Monitor CVE-2026-60004 Gitea Gitea exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/api/v1/version"; http.header; content:"Accept: application/json"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2026-60004; classtype:web-application-attack; sid:9358149; rev:1;)
alert http any any -> $HOME_NET [3000,3001,8080,8888] (msg:"GG PoC-Monitor CVE-2026-60004 Gitea Gitea exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/user/sign_up"; http.header; content:"Accept: text/html"; nocase; http.request_body; content:"_csrf="; http.request_body; content:"user_name="; http.request_body; content:"email="; http.request_body; content:"password="; http.request_body; content:"retype="; http.request_body; content:"user_name=poc_"; reference:url,poc.griffinguard.io/cve/CVE-2026-60004; classtype:web-application-attack; sid:9395517; rev:1;)
alert http any any -> $HOME_NET [3000,8080,8888] (msg:"GG PoC-Monitor CVE-2026-60004 Gitea Gitea exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/user/sign_up"; http.header; content:"Accept: text/html"; nocase; http.header; content:"Accept: text/html,application/xhtml+xml,application/xml|3b|q=0.9,*/*|3b|q=0.8"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2026-60004; classtype:web-application-attack; sid:9761965; rev:1;)
alert http any any -> $HOME_NET [3000,8080,8888] (msg:"GG PoC-Monitor CVE-2026-60004 Gitea Gitea exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/v1/repos/"; http.uri; content:"/diffpatch"; http.header; content:"Accept: application/json"; nocase; http.header; content:"Authorization: Basic "; nocase; http.request_body; content:"|22|content|22|"; http.request_body; content:"|22|message|22|"; http.request_body; content:"|22|branch|22|:|22|main|22|"; http.request_body; content:"|22|sha|22|"; http.request_body; content:"|22|message|22|:|22|apply-1|22|"; http.request_body; content:"|22|message|22|:|22|apply-2|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-60004; classtype:web-application-attack; sid:9118228; rev:1;)
alert http any any -> $HOME_NET [3000,8080,8888] (msg:"GG PoC-Monitor CVE-2026-60004 Gitea Gitea exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/v1/user/repos"; http.header; content:"Accept: application/json"; nocase; http.header; content:"Authorization: Basic "; nocase; http.request_body; content:"|22|name|22|"; http.request_body; content:"|22|private|22|"; http.request_body; content:"|22|auto_init|22|"; http.request_body; content:"|22|default_branch|22|:|22|main|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-60004; classtype:web-application-attack; sid:9755194; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: Gitea Gitea exploit attempt (CVE-2026-60004)
id: gg-pocmon-cve-2026-60004-9358149
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-60004. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-60004
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/api/v1/version'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.60004
title: Gitea Gitea exploit attempt (CVE-2026-60004)
id: gg-pocmon-cve-2026-60004-9395517
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-60004. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-60004
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/user/sign_up'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.60004
title: Gitea Gitea exploit attempt (CVE-2026-60004)
id: gg-pocmon-cve-2026-60004-9761965
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-60004. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-60004
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/user/sign_up'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.60004
title: Gitea Gitea exploit attempt (CVE-2026-60004)
id: gg-pocmon-cve-2026-60004-9118228
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-60004. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-60004
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/v1/repos/'
- '/diffpatch'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.60004
title: Gitea Gitea exploit attempt (CVE-2026-60004)
id: gg-pocmon-cve-2026-60004-9755194
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-60004. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-60004
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/v1/user/repos'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.60004