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

