# CVE-2026-59774: Gitea Org-mode markup arbitrary file read via INCLUDE directive

Source: https://junglewise.ai/threats/cve-2026-59774-gitea-s-org-mode-markup-renderer-processes-include-directives  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-14. Updated: 2026-10-16  
License: CC BY 4.0 with a link back

CVE-2026-59774 · Severity: critical · CVSS 9.8 · Published 2026-10-14

Gitea, a self-hosted Git repository platform, fails to sanitize user-supplied Org-mode markup on the repository endpoint, allowing unauthenticated attackers to read files from the server. An attacker can exploit this to disclose sensitive configuration files like app.ini containing authentication tokens, then chain this with Git hook access to execute arbitrary commands as the Gitea service account.

Technologies: [Gitea](https://junglewise.ai/threats/technologies/gitea). Vendors: [Gitea](https://junglewise.ai/threats/vendors/gitea).

## Quick answers

**Is CVE-2026-59774 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-59774 being exploited in the wild.

**How severe is CVE-2026-59774?** Critical severity, with a CVSS score of 9.8, published 14 October 2026.

**Which products and versions are affected?** Gitea before 1.27.1.

**Is there a fix for CVE-2026-59774?** Yes: fixed in Gitea 1.27.1. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-59774 attacked?** It is attacked over the network, in a web application.

**Am I affected by CVE-2026-59774?** Check whether you run Gitea at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in Gitea 1.27.1

## Technical details

The Org-mode markup renderer processes #+INCLUDE directives without path validation, enabling arbitrary file disclosure via a public repository's markup endpoint. The vulnerability is unauthenticated and network-accessible. Attackers who obtain the INTERNAL_TOKEN from app.ini can escalate to remote code execution through Git hook modification.

## Affected products

- Gitea Gitea before 1.27.1

## Timeline

- 2026-07-27: disclosed
- 2026-07-27: patched

## References

- [https://blog.gitea.com/release-of-1.27.1/](https://blog.gitea.com/release-of-1.27.1/)
- [https://github.com/go-gitea/gitea/pull/38642](https://github.com/go-gitea/gitea/pull/38642)

## Related threats

- [Gitea account takeover via OAuth2 auto-linking](https://junglewise.ai/threats/cve-2026-120263-when-oauth2-client-account-linking-is-set-to-auto-not-the)
- [Gitea limited-visibility profile disclosure via public-only token](https://junglewise.ai/threats/cve-2026-119627-the-web-profile-and-rss-atom-feed-routes-of-users-and)
- [Gitea token scope bypass in web routes](https://junglewise.ai/threats/cve-2026-119625-the-username-web-route-accepted-personal-access-tokens-over-http)
- [Gitea project boards information disclosure of private pull requests](https://junglewise.ai/threats/cve-2026-119533-repository-and-organization-project-boards-listed-the-pull)
- [Gitea API token scope bypass in repository deletion](https://junglewise.ai/threats/cve-2026-119441-delete-api-v1-orgs-org-repos-deletes-all-repositories-of-an)
