/

CVE-2026-58412

Severity:

HIGH RISK

(8.2)

Improper Authorization (CWE-863) in Filecoin Pin Action

CVE-2026-58412

Deferred

Vulnerability type

Category:

Improper Authorization

CWE:

CWE-863

Impact:

Unauthorized resource consumption and data integrity compromise

Severity:

HIGH RISK

(8.2)

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

Filecoin Pin's upload GitHub Action may fail to recognize pull requests from forked repositories when processing a privileged workflow_run event. An external contributor could then cause an attacker-controlled artifact to be uploaded using the repository owner's Filecoin wallet, potentially consuming funds and polluting stored datasets.

Filecoin Pin's upload GitHub Action may fail to recognize pull requests from forked repositories when processing a privileged workflow_run event. An external contributor could then cause an attacker-controlled artifact to be uploaded using the repository owner's Filecoin wallet, potentially consuming funds and polluting stored datasets.

Affected context

The issue occurs in deployments using Filecoin Pin's documented two-workflow GitHub Actions pattern, where an untrusted pull-request workflow creates an artifact and a privileged workflow_run workflow later downloads and uploads it. The risk is present when fork detection relies only on pull-request event fields that are not populated in the workflow_run context, allowing the artifact upload path to proceed with repository-owned wallet credentials.

The issue occurs in deployments using Filecoin Pin's documented two-workflow GitHub Actions pattern, where an untrusted pull-request workflow creates an artifact and a privileged workflow_run workflow later downloads and uploads it. The risk is present when fork detection relies only on pull-request event fields that are not populated in the workflow_run context, allowing the artifact upload path to proceed with repository-owned wallet credentials.

Exploit preconditions

  • Attack surface: GitHub Actions workflow automation using the upload action
  • Required access: Ability to submit or update a pull request from an external fork
  • Trigger point: The privileged workflow_run job processing the artifact from the untrusted workflow
  • Why exploitation is possible: Fork status is not revalidated in the workflow_run context before wallet initialization and artifact upload
  • Credential requirement: The attacker does not need access to or disclosure of the repository's wallet private key
  • Attack surface: GitHub Actions workflow automation using the upload action
  • Required access: Ability to submit or update a pull request from an external fork
  • Trigger point: The privileged workflow_run job processing the artifact from the untrusted workflow
  • Why exploitation is possible: Fork status is not revalidated in the workflow_run context before wallet initialization and artifact upload
  • Credential requirement: The attacker does not need access to or disclosure of the repository's wallet private key

Why this happens

The action performs authorization logic using event-specific data that is available for pull_request events but absent from workflow_run events. As a result, a fork-origin check can incorrectly evaluate as safe, and the later privileged operation trusts an artifact produced by an untrusted workflow. This maps to CWE-863, Improper Authorization, because the action does not consistently enforce the required trust boundary before using repository-owned resources.

The action performs authorization logic using event-specific data that is available for pull_request events but absent from workflow_run events. As a result, a fork-origin check can incorrectly evaluate as safe, and the later privileged operation trusts an artifact produced by an untrusted workflow. This maps to CWE-863, Improper Authorization, because the action does not consistently enforce the required trust boundary before using repository-owned resources.

Potential impact

  • An attacker-controlled artifact may be stored through the repository's Filecoin account
  • Configured wallet funds could be consumed without repository-owner approval
  • Stored datasets may be polluted with unauthorized or malicious content
  • Automated storage costs could increase unexpectedly
  • Downstream consumers may process or rely on untrusted pinned data
  • An attacker-controlled artifact may be stored through the repository's Filecoin account
  • Configured wallet funds could be consumed without repository-owner approval
  • Stored datasets may be polluted with unauthorized or malicious content
  • Automated storage costs could increase unexpectedly
  • Downstream consumers may process or rely on untrusted pinned data

General mitigation guidance

Mitigation generally focuses on enforcing authorization consistently across

every workflow event and treating artifacts from fork-based workflows as

untrusted.

Common defensive patterns include:

  • Repeating fork and repository-origin checks immediately before privileged uploads
  • Binding authorization decisions to trusted workflow and commit metadata
  • Separating untrusted artifact production from credentialed upload operations
  • Requiring explicit approval or policy checks before consuming external artifacts
  • Limiting wallet permissions, spending capacity, and workflow token privileges
  • Using isolated accounts or environments for automated uploads
  • Avoiding exposure of wallet credentials to jobs that process untrusted content

Mitigation generally focuses on enforcing authorization consistently across

every workflow event and treating artifacts from fork-based workflows as

untrusted.

Common defensive patterns include:

  • Repeating fork and repository-origin checks immediately before privileged uploads
  • Binding authorization decisions to trusted workflow and commit metadata
  • Separating untrusted artifact production from credentialed upload operations
  • Requiring explicit approval or policy checks before consuming external artifacts
  • Limiting wallet permissions, spending capacity, and workflow token privileges
  • Using isolated accounts or environments for automated uploads
  • Avoiding exposure of wallet credentials to jobs that process untrusted content

How teams detect issues like this

Organizations can identify similar authorization flaws through:

  • Static analysis checks for event-specific fields used as universal trust signals
  • Code review of workflow_run jobs that download artifacts from pull requests
  • Rules requiring origin, repository, workflow, and commit validation before privileged actions
  • Policy checks that flag credentials used in jobs processing fork-generated artifacts
  • Monitoring for unexpected wallet spending, upload volume, or artifact provenance
  • Automated security review tools that model GitHub Actions event and permission boundaries

Organizations can identify similar authorization flaws through:

  • Static analysis checks for event-specific fields used as universal trust signals
  • Code review of workflow_run jobs that download artifacts from pull requests
  • Rules requiring origin, repository, workflow, and commit validation before privileged actions
  • Policy checks that flag credentials used in jobs processing fork-generated artifacts
  • Monitoring for unexpected wallet spending, upload volume, or artifact provenance
  • Automated security review tools that model GitHub Actions event and permission boundaries

Sources

SourceLink
github.comgithub.com/filecoin-project/filecoin-pin/commit/6fb9efd1796e64a3515dffaa45b262e03cbd197c
github.comgithub.com/filecoin-project/filecoin-pin/pull/588
github.comgithub.com/filecoin-project/filecoin-pin/security/advisories/GHSA-4rpx-vcp4-863j
github.comgithub.com/filecoin-project/filecoin-pin/tree/v1.1.0

Frequently asked

questions

Yes. An external contributor may be able to trigger the vulnerable workflow path

by submitting a pull request from a fork, provided the repository uses the

affected artifact-transfer and privileged workflow pattern.

No. The action may use the repository owner's configured wallet internally,

allowing unauthorized storage activity without disclosing the private key.

Revalidate fork origin, artifact provenance, workflow identity, and commit

association immediately before any privileged upload or wallet initialization.

Treat fork-produced artifacts as untrusted, minimize credential scope, require

explicit approval for privileged workflows, and enforce event-aware authorization

policies in code review and CI controls.

Yes. An external contributor may be able to trigger the vulnerable workflow path

by submitting a pull request from a fork, provided the repository uses the

affected artifact-transfer and privileged workflow pattern.

No. The action may use the repository owner's configured wallet internally,

allowing unauthorized storage activity without disclosing the private key.

Revalidate fork origin, artifact provenance, workflow identity, and commit

association immediately before any privileged upload or wallet initialization.

Treat fork-produced artifacts as untrusted, minimize credential scope, require

explicit approval for privileged workflows, and enforce event-aware authorization

policies in code review and CI controls.

Find out what's already
exploitable in your codebase.