Description
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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Gitea | Gitea | 1.22 – < 1.27.1 | 1.27.1 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Forgejo Arbitrary File Read via Org-mode Include
auxiliary/gather/forgejo_orgmode_fileread_cve_2026_59774
GitHub 3 repositories
-
FlowerWitch/CVE-2026-59774_docker ★ 5 · Aug 6, 2026
CVE-2026-59774
-
Ly0kha/CVE-2026-59774 ★ 1 · Oct 24, 2026
Gitea LFI to RCE exploit (CVE-2026-59774) — arbitrary file read via Org-mode #+INCLUDE, chained to remote code execution through git hook injection
-
asvorg/CVE-2026-59774-poc ★ 1 · Oct 21, 2026
PoC for Gitea versions before 1.27.1 is vulnerable to Path Traversal (CWE-22), which leads to unauthenticated arbitrary file read / information disclosure leading to RCE CVSS 9.8
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- Gitea 1.22.1-1.27.0 - Unauthenticated Arbitrary File Read http/cves/2026/CVE-2026-59774.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Advisories 1
- WID-SEC-2026-2612 Gitea: Schwachstelle ermöglicht Offenlegung von Informationen und Codeausführung BSI CERT-Bund (WID) · Oct 14, 2026
References
- GitHub Security Advisory GHSA-6v53-hr58-556r vendor-advisory
- Fix: go-gitea/gitea pull request #38642 patch
- Gitea 1.27.1 release announcement release-notes
- Fix: go-gitea/gitea pull request #38645 patch
- go-gitea/gitea v1.27.1 release release-notes