Gitea
Gitea Org-mode file disclosure and code execution
Gitea's Org-mode markup renderer processes INCLUDE directives supplied to the repository markup endpoint without preventing access to server-side files. An unauthenticated attacker can use a suitable public repository to read files accessible to the Gitea service account. If the disclosed files include app.ini and its INTERNAL_TOKEN, the attacker can chain the disclosure with internal logger access to modify a Git hook and execute commands as the Gitea service account.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 1.22, < 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/…
- Patch github.com/go-gitea/gitea/pull/38642
- Release notes blog.gitea.com/release-of-1.27.1
2 more
Timeline
Days relative to CVE publicationFirst public PoC 6.4 days after publication; not in CISA KEV. First PoC: asvorg/CVE-2026-59774-poc (created 21 Oct 2026, found by us: 14 Nov 2026).
PoC repositories
Found on GitHub.2 PoCs · 1 suspicious or fake
PoCs 2
| Repository | Created | Found by us | Stars | Assessment |
|---|---|---|---|---|
| asvorg/CVE-2026-59774-poc | 21 Oct 2026 +6.4 d | 14 Nov 2026 | 1 | PoC |
| Ly0kha/CVE-2026-59774 | 24 Oct 2026 +9.8 d | 14 Nov 2026 | 1 | PoC |
Suspicious or fake 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| FlowerWitch/CVE-2026-59774_docker | 6 Aug 2026 −69 d | 5 | Suspicious · score 50
Why suspicious
|
Only PoCs count toward the first-PoC date and the characteristics below. Suspicious repositories (score ≥ 50) never count. "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 |
|---|---|---|---|
| Metasploit | Metasploit auxiliary: Forgejo Arbitrary File Read via Org-mode Include (auxiliary/gather/forgejo_orgmode_fileread_cve_2026_59774) | unknown | 14 Nov 2026 |
| nuclei template | nuclei template: Gitea 1.22.1-1.27.0 - Unauthenticated Arbitrary File Read | unknown | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 2 PoC reposGET /api/v1/repos/{var}
- Key headers
Origin: {var}Referer: {var}/{var}- Content-Type
application/json- Ports
- 3000
- Seen in
- 2 repos: Ly0kha/CVE-2026-59774, asvorg/CVE-2026-59774-poc
- Evidence
- Ly0kha/CVE-2026-59774/poc.py:173 Ly0kha/CVE-2026-59774/poc.py:751 asvorg/CVE-2026-59774-poc/poc.py:33
GET /{var}/src/branch/{var}
- Ports
- 3000
- Seen in
- 2 repos: Ly0kha/CVE-2026-59774, asvorg/CVE-2026-59774-poc
- Evidence
- Ly0kha/CVE-2026-59774/poc.py:185 asvorg/CVE-2026-59774-poc/poc.py:45
POST /{var}/markup
- Key headers
Origin: {var}Referer: {var}/{var}- Body markers
"Mode":"file""FilePath":"poc.org""Text""Context"inapplication/json- Ports
- 3000
- Seen in
- 2 repos: Ly0kha/CVE-2026-59774, asvorg/CVE-2026-59774-poc
- Evidence
- Ly0kha/CVE-2026-59774/poc.py:227 asvorg/CVE-2026-59774-poc/poc.py:114
GET /api/internal/repo/1
- Key headers
Authorization: Bearer {var}Origin: {var}Referer: {var}/{var}- Content-Type
application/json- Seen in
- 1 repo: Ly0kha/CVE-2026-59774
- Evidence
- Ly0kha/CVE-2026-59774/poc.py:150 Ly0kha/CVE-2026-59774/poc.py:369 Ly0kha/CVE-2026-59774/poc.py:493 Ly0kha/CVE-2026-59774/poc.py:588
GET /api/v1/repos/search
- Query
limit=5- Key headers
Origin: {var}Referer: {var}/{var}- Content-Type
application/json- Seen in
- 1 repo: Ly0kha/CVE-2026-59774
- Evidence
- Ly0kha/CVE-2026-59774/poc.py:516
GET /{var}/markup
- Ports
- 3000
- Seen in
- 1 repo: asvorg/CVE-2026-59774-poc
- Evidence
- asvorg/CVE-2026-59774-poc/poc.py:10
PATCH /api/internal/repo/1
- Key headers
Origin: {var}Referer: {var}/{var}- Body markers
"content""content":"""#!/bin/bash"inapplication/json- Seen in
- 1 repo: Ly0kha/CVE-2026-59774
- Evidence
- Ly0kha/CVE-2026-59774/poc.py:467 Ly0kha/CVE-2026-59774/poc.py:736
PATCH /api/v1/repos/OWNER/REPO/hooks/git/post-receive
- Seen in
- 1 repo: Ly0kha/CVE-2026-59774
- Evidence
- Ly0kha/CVE-2026-59774/poc.py:941
POST /api/internal/repo/1
- Key headers
Origin: {var}Referer: {var}/{var}- Body markers
"Mode":"file""FilePath":"poc.org""Text""Context"inapplication/json- Seen in
- 1 repo: Ly0kha/CVE-2026-59774
- Evidence
- Ly0kha/CVE-2026-59774/poc.py:404 Ly0kha/CVE-2026-59774/poc.py:505 Ly0kha/CVE-2026-59774/poc.py:608
POST /api/v1/user/repos
- Key headers
Origin: {var}Referer: {var}/{var}- Body markers
"Mode":"file""FilePath":"poc.org""Text""Context"inapplication/json- Seen in
- 1 repo: Ly0kha/CVE-2026-59774
- Evidence
- Ly0kha/CVE-2026-59774/poc.py:543
POST /api/v1/users/{var}/tokens
- Body markers
"name"inapplication/json- Seen in
- 1 repo: Ly0kha/CVE-2026-59774
- Evidence
- Ly0kha/CVE-2026-59774/poc.py:439
POST /user/sign_up
- Seen in
- 1 repo: Ly0kha/CVE-2026-59774
- Evidence
- Ly0kha/CVE-2026-59774/poc.py:427
PUT /api/internal/repo/1
- Key headers
Origin: {var}Referer: {var}/{var}- Body markers
"Mode":"file""FilePath":"poc.org""Text""Context"inapplication/json- Seen in
- 1 repo: Ly0kha/CVE-2026-59774
- Evidence
- Ly0kha/CVE-2026-59774/poc.py:498 Ly0kha/CVE-2026-59774/poc.py:597
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/api/v1/repos/[^/?#]*(?:[?#].*)?$
(?i)^/[^/?#]*/src/branch/[^/?#]*(?:[?#].*)?$
(?i)^/[^/?#]*/markup(?:[?#].*)?$
(?i)^/api/internal/repo/1(?:[?#].*)?$
(?i)^/api/v1/repos/search\?(?:.*&)?limit=5
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [3000] (msg:"GG PoC-Monitor CVE-2026-59774 Gitea Gitea exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/api/v1/repos/"; http.header_names; content:"Origin"; nocase; http.header_names; content:"Referer"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2026-59774; classtype:web-application-attack; sid:9550652; rev:1;)
alert http any any -> $HOME_NET [3000] (msg:"GG PoC-Monitor CVE-2026-59774 Gitea Gitea exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/src/branch/"; reference:url,poc.griffinguard.io/cve/CVE-2026-59774; classtype:web-application-attack; sid:9245003; rev:1;)
alert http any any -> $HOME_NET [3000] (msg:"GG PoC-Monitor CVE-2026-59774 Gitea Gitea exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/markup"; http.header_names; content:"Origin"; nocase; http.header_names; content:"Referer"; nocase; http.request_body; content:"|22|Mode|22|:|22|file|22|"; http.request_body; content:"|22|FilePath|22|:|22|poc.org|22|"; http.request_body; content:"|22|Text|22|"; http.request_body; content:"|22|Context|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-59774; classtype:web-application-attack; sid:9351406; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-59774 Gitea Gitea exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/api/internal/repo/1"; http.header; content:"Authorization: Bearer "; nocase; http.header_names; content:"Origin"; nocase; http.header_names; content:"Referer"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2026-59774; classtype:web-application-attack; sid:9624257; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-59774 Gitea Gitea exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/api/v1/repos/search"; http.uri; content:"limit=5"; http.header_names; content:"Origin"; nocase; http.header_names; content:"Referer"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2026-59774; classtype:web-application-attack; sid:9064795; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: Gitea Gitea exploit attempt (CVE-2026-59774)
id: gg-pocmon-cve-2026-59774-9550652
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-59774. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-59774
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/api/v1/repos/'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.59774
title: Gitea Gitea exploit attempt (CVE-2026-59774)
id: gg-pocmon-cve-2026-59774-9245003
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-59774. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-59774
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/src/branch/'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.59774
title: Gitea Gitea exploit attempt (CVE-2026-59774)
id: gg-pocmon-cve-2026-59774-9351406
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-59774. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-59774
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/markup'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.59774
title: Gitea Gitea exploit attempt (CVE-2026-59774)
id: gg-pocmon-cve-2026-59774-9624257
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-59774. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-59774
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/api/internal/repo/1'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.59774
title: Gitea Gitea exploit attempt (CVE-2026-59774)
id: gg-pocmon-cve-2026-59774-9064795
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-59774. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-59774
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/api/v1/repos/search'
cs-uri-query|contains|all:
- 'limit=5'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.59774