---
id: "CVE-2026-118386"
kind: "vulnerability"
aliases: ["CVE-2026-118386"]
title: "Gitea: review-triggered workflows run attacker commits and leak Actions secrets"
severity: "high"
cvss: null
epss: null
exploited: false
status: "open"
category: "infrastructure"
products: [{"name": "gitea", "fixed": ["28.3.0"], "affected": "< 28.3.0 (oldest affected version not stated by Gitea)", "ecosystem": "vendor"}]
ecosystems: []
tags: ["ci", "gitea", "gitea-actions", "infrastructure", "self-hosted"]
not_affected_if: ["managed-hosting", "no-actions-runner"]
published_at: "2026-11-01T10:18:36+00:00"
first_seen_at: "2026-11-01T10:49:33+00:00"
updated_at: "2026-11-01T10:52:06+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-118386", "first_seen_at": "2026-11-01T10:49:33+00:00"}, {"source": "analyst", "url": null, "first_seen_at": "2026-11-01T10:52:06+00:00"}]
---

# Gitea: review-triggered workflows run attacker commits and leak Actions secrets

Gitea Actions read workflows from a commit named in a pull request review instead of the pull request head, so a user with read access can plant a commit and run it without approval. The attacker's workflow receives the repository's and owner's Actions secrets and a GITEA_TOKEN with write access.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- vendor:gitea affected < 28.3.0 (oldest affected version not stated by Gitea) fixed 28.3.0

## How to check

- Run `gitea --version`; versions before 28.3.0 contain the flaw (Gitea's post names 28.3.0 as the fix; it does not state the oldest affected version, so treat older releases as exposed).
- Exposure needs a Gitea Actions runner serving the repository and users with read access you do not trust.
- Look in .gitea/workflows (and .github/workflows) for workflows triggered by pull_request_review, and rotate Actions secrets of repositories where untrusted readers exist and review events were possible.

## Fix

Upgrade Gitea to 28.3.0, which makes pull_request_review workflows run on the pull request head. Until then, disable Actions runners for repositories where untrusted users have read access, or avoid pull_request_review workflows that use secrets.

## Timeline

- 2026-11-01T10:49:33+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-118386
- 2026-11-01T10:52:06+00:00 analyst — Gitea 28.3.0 release post (maintainer) names fix: review-triggered workflows now run on PR head (#40099/#40117), reported by Anthropic. Lower bound of affected range not stated by Gitea; a third-party aggregator says >=1.19.0, unverified. Not exploited per sources.

## Documents

- [describes] NVD CVE-2026-118386 https://nvd.nist.gov/vuln/detail/CVE-2026-118386
- [fix] Gitea 28.3.0 is released (security section) https://blog.gitea.com/release-of-28.3.0/

## From the sources

Workflows triggered by a pull request review were read from the commit named in the review's `commit_id`, while the fork restrictions were decided by the reviewed pull request, and the commit was not checked to belong to that pull request. A user with read access to a repository could place a commit of their own in it, through a fork pull request or an AGit push, and submit a review naming that commit on a pull request whose head branch is in the same repository. On instances with a runner serving the repository, the attacker's workflow then ran without approval, received the Actions secrets of the repository and its owner, and got a `GITEA_TOKEN` with write access to the repository. Review-triggered workflows now run on the pull request head.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
