/

CVE-2026-58416

Severity:

HIGH RISK

(7.1)

Authorization Bypass (CWE-863) in Fork-PR Actions Task

CVE-2026-58416

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-280, CWE-863

Impact:

Unauthorized Access to Private Repository Data

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A missing fork-pull-request authorization guard allows an Actions task to access a third private repository through a collaborative-owner branch. The issue becomes risky when untrusted fork-PR workflows can execute with repository permissions that expose private repository contents.

Affected context

This vulnerability occurs in automation workflows that process pull requests from forks and use collaborative-owner branches or related repository context. It is present when the workflow does not distinguish untrusted fork-PR execution from trusted repository-owned execution before granting access to another private repository.

Exploit preconditions

  • Attack surface: Pull-request automation triggered by a fork
  • Required access: Ability to submit or influence a fork-based pull request
  • Trigger point: Execution of the Fork-PR Actions task through a collaborative-owner branch
  • Why exploitation is possible: A missing fork-PR guard allows an untrusted workflow context to receive authorization intended for trusted repository-owned branches

Why this happens

The underlying bug is an authorization boundary failure. The workflow grants access based on branch or collaboration context without reliably verifying whether the event originated from an untrusted fork.

This maps primarily to CWE-863: Incorrect Authorization, because access-control decisions do not correctly constrain a lower-trust execution context. It is also related to CWE-280: Improper Handling of Insufficient Permissions or Privileges, where operations proceed without adequately enforcing the required privilege level.

Potential impact

  • An attacker may read sensitive files from a private repository
  • Repository source code, configuration, or metadata could be disclosed
  • Exposed credentials or workflow data could enable further compromise
  • The affected automation environment could be used for lateral access or supply-chain abuse

General mitigation guidance

Mitigation generally focuses on enforcing trust boundaries before granting repository access.

Common defensive patterns include:

  • Treating all fork-originated pull requests as untrusted by default
  • Applying explicit fork-PR guards before accessing private repositories or secrets
  • Using least-privilege tokens scoped to the minimum repository and operation
  • Separating trusted and untrusted workflow jobs
  • Avoiding automatic execution of privileged tasks for untrusted contributions
  • Requiring explicit approval or policy checks before privileged automation runs
  • Preventing sensitive data from being exposed to fork-triggered jobs

How teams detect issues like this

Organizations can detect this class of issue through:

  • Static analysis for workflows that grant repository access without fork-event checks
  • Code review of branch-based authorization decisions and event filters
  • Policy checks that flag privileged tokens or private-repository operations in fork-PR jobs
  • Audit-log review for private repository access originating from fork-triggered workflows
  • Automated workflow security scanners that identify excessive permissions and missing trust-boundary conditions

Sources

SourceLink
blog.gitea.comblog.gitea.com/gitea-1.27.0-is-released/
github.comgithub.com/go-gitea/gitea/releases/tag/v1.27.0
github.comgithub.com/go-gitea/gitea/security/advisories/GHSA-fj8v-hjwv-qm88

Frequently asked

questions

Yes, it may be exploitable through a submitted fork pull request when the affected automation runs the vulnerable task and the attacker can influence the fork-PR workflow context.

No. The issue is specifically risky because a lower-trust fork-PR context may obtain access intended for trusted repository-owned automation.

Enforce an explicit fork-PR guard before any private-repository access, and use narrowly scoped credentials only in separately controlled trusted jobs.

Treat fork workflows as untrusted, review authorization decisions independently of branch names, minimize token permissions, and enforce CI/CD security policies that prevent privileged operations in untrusted contexts.

Find out what's already
exploitable in your codebase.