1-minute read
What a defender needs to know
Gitea 1.22.1 through 1.27.0 can let an unauthenticated remote user submit file-mode Org markup to a public repository’s /markup endpoint. An absolute #+INCLUDE path reaches the Org library’s default file callback, which reads files with the Gitea service account’s permissions.
The direct fix is 1.27.1. If the request exposes app.ini, an attacker can obtain INTERNAL_TOKEN. Under the vendor’s stated storage-permission condition, that token can be used through the internal logger to plant a Git hook that executes as the Gitea OS user during an anonymous clone. The advisory does not report active exploitation.
Preserve Gitea and reverse-proxy access logs and search the vulnerable exposure window for anonymous or unexplained POST requests to paths ending in /markup. Correlate them with clones, hook or managed Git configuration changes, child processes, file writes, and outbound connections under the Gitea service account.
Upgrade and verify the running process reports 1.27.1 or later. Rotate the internal token and any other readable database, OAuth, JWT, deployment, or integration credentials when suspicious activity or missing retention prevents a defensible review.
Verify that every reachable instance is fixed. Investigate unexpected markup and clone activity, compare hooks and managed Git configuration with known-good state, secure readable secrets, and investigate unexplained Gitea service-account behavior.