CVE-2026-118386

Gitea Actions fork workflow trust through pull request review commit

Published Nov 1, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The flaw allows an attacker who can submit a pull‑request review to specify a commit identifier that is not actually part of that pull request. When a review is posted, Gitea looked at the commit named in the review for the workflow definition. Because the fork restrictions were derived from the pull request, but the specific commit was not validated, the runner executed the workflow using the repository’s secrets and granted the attacker a GITEA_TOKEN with write permission. The combination of arbitrary workflow execution, secret exposure, and repository write access amounts to a full remote code execution and privilege escalation in the repository context.

Affected Systems

Any Gitea instance that supports forked workflow execution, regardless of build number. A patch was applied in release 28.3.0, which curtails the validation logic. Because the affected-version list is not supplied, all prior releases that enabled pull‑request review‑triggered workflows remain vulnerable.

Risk and Exploitability

The vulnerability can be triggered remotely by any user who has read access to the repository and who can submit a pull‑request review, using either a forked pull request or a direct commit via an AGit push. The attacker does not need elevated privileges beyond read access, and the exploitation requires no additional configuration. The CVSS score is 6.5, EPSS < 1%, and KEV not listed, but the described consequence of arbitrary workflow execution with repository secrets and write access indicates a moderate‑severity risk. Without mitigation, an attacker can execute arbitrary code in the context of the repository owner and potentially alter or delete critical data.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Gitea to version 28.3.0 or later, which corrects the workflow validation logic.
  • If an upgrade is not immediately possible, disable review‑triggered workflows or restrict them to the repository’s default branch(s).
  • Reduce the number of users with read access or enforce branch protections so only trusted users can submit pull requests and reviews.

Generated by OpenCVE AI on November 6, 2026 at 17:48 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N'}

Type Values Removed Values Added
Weaknesses CWE-829
References
Metrics threat_severity

None

cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Important

Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea
Vendors & Products Gitea
Gitea gitea
Type Values Removed Values Added
Description 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.
Title Gitea Actions fork workflow trust through pull request review commit
Weaknesses CWE-863
References
Weaknesses
  • CWE-829

    Inclusion of Functionality from Untrusted Control Sphere

  • CWE-863

    Incorrect Authorization

Sources

Status
PUBLISHED
Assigner
Gitea
Published
Updated
Nov 6, 2026, 3:44 PM
Reserved
Nov 1, 2026, 8:48 AM
Status
Deferred
Published
Nov 1, 2026, 10:18 AM
Modified
Nov 6, 2026, 4:17 PM
Severity
Important
Public date
Nov 1, 2026, 9:47 AM