Skip to content

Arbitrary code execution in GitHub Actions canary workflow leads to secret exfiltration

Critical
grabbou published GHSA-588g-38p4-gr6x Aug 5, 2025

Package

actions .github/workflows/release-canary.yml (GitHub Actions)

Affected versions

-

Patched versions

-

Description

Impact

A high-severity vulnerability existed in the .github/workflows/release-canary.yml GitHub Actions workflow of the repository. The workflow improperly used the pull_request_target event trigger, which allowed for untrusted code from a forked pull request to be executed in a privileged context.

An attacker could create a pull request containing a malicious preinstall script in the package.json file and then trigger the vulnerable workflow by posting a specific comment (!canary). This allowed for arbitrary code execution, leading to the exfiltration of sensitive secrets such as GITHUB_TOKEN and NPM_TOKEN, and could have allowed an attacker to push malicious code to the repository or publish compromised packages to the NPM registry.

The vulnerability was remediated by removing the workflow file from the repository. No packages were affected.

Going forward, users are strongly advised to:

  • Remove or carefully audit any workflows triggered by pull_request_target or issue_comment
  • Avoid checking out untrusted code in workflows running with write-level tokens
  • Rotate any potentially compromised secrets, especially GITHUB_TOKEN and NPM_TOKEN

References

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

CVE ID

CVE-2025-54594

Weaknesses

No CWEs

Credits