CVE-2026-59774: Gitea Org-mode #+INCLUDE lets anonymous users read server files, then RCE
Gitea's repository markup endpoint (POST /{owner}/{repo}/markup) renders Org-mode text with a #+INCLUDE directive that can read any absolute path, and anonymous users may call it for any public repository. An unauthenticated attacker can read files readable by the Gitea service account, including app.ini; with the INTERNAL_TOKEN from it they can inject a Git hook through the internal logger and run commands as the Gitea OS user. Found by XBOW and fixed in Gitea 1.27.1 together with CVE-2026-60004, which CISA lists as exploited. Rated CVSS 9.8.
- CVE-2026-59774CVE identifier
- 9.8CVSS 3.1 base score (critical)
- 28.3%EPSS: chance of exploitation in the next 30 days (higher than 98% of CVEs)
- 2026-10-14published
What do these terms mean? CVE · CVSS score · exploited (KEV) · EPSS · backported fix · all terms
What to do now
- Check whether you run the affected software and which version (commands below).
- Install the fixed version for your system: see “Patch it” below.
- Restart Gitea with the new binary or image. If the instance had public repositories and was reachable while vulnerable, rotate INTERNAL_TOKEN, SECRET_KEY, OAuth/JWT secrets and database credentials stored in app.ini, and check Git hooks and the global Git configuration for unexpected changes.
- If you cannot patch today, apply the temporary mitigation below and patch as soon as possible.
Affected and fixed versions
Affected:
- Gitea 1.22 up to (not including) 1.27.1 (the advisory notes v1.22.1 through v1.27.0)
Fixed in:
- Gitea 1.27.1
Am I affected?
gitea --version
curl -s https://<your-gitea-host>/api/v1/version
docker exec gitea gitea --version
Patch it
Use the commands for your system. Distribution packages often keep an older version number with the fix backported, so compare with the fixed package versions in the table below, not only with the upstream version.
Docker images
docker pull docker.gitea.com/gitea:1.27.2 # 1.27.1 or later
# in docker-compose.yml set: image: docker.gitea.com/gitea:1.27.2
docker compose up -dBuilt from source
# official binary install (docs.gitea.com); back up the data directory and database first
wget -O gitea https://dl.gitea.com/gitea/1.27.2/gitea-1.27.2-linux-amd64 # 1.27.1 or later
chmod +x gitea
sudo systemctl stop gitea
sudo cp gitea /usr/local/bin/gitea
sudo systemctl start giteaGeneral update steps for every system are on the Linux and Unix & BSD pages; after updating, see which services to restart.
If you cannot patch yet
- Until upgraded, block POST requests to /{owner}/{repo}/markup at the reverse proxy. Requiring sign-in (REQUIRE_SIGNIN_VIEW = true in [service]) removes the anonymous path described in the advisory, but signed-in users who can read a repository may still reach the endpoint.
Related vulnerabilities
Sources
- Gitea security advisory GHSA-6v53-hr58-556r
- Gitea blog: Gitea 1.27.1 is released
- Gitea v1.27.1 release
- Gitea Docs: Upgrade from an old Gitea
- https://github.com/go-gitea/gitea/pull/38642
- https://github.com/go-gitea/gitea/pull/38645
- CVE-2026-59774 on CVE.org
- CVE-2026-59774 on NVD
Page generated automatically from official sources on 2026-11-03 18:05 UTC and reviewed by an editor. Always confirm with your vendor's advisory.