Skip to content
RCE Advisory Intermediate

GHSL-2025-099: Arbitrary code execution in cross-platform-actions/action

The release workflow in the cross-platform-actions/action repository inserted the branch name from a pull request into a shell command without sanitising it. An attacker could craft a branch name that injects commands, which would then run with the workflow's write permissions.

p Follow

Originally disclosed on GitHub Security Lab

The cross-platform-actions/action repository was vulnerable to a code injection issue in its release.yml workflow, affecting the latest changeset at the time of review. This vulnerability could potentially have allowed an attacker to inject and execute arbitrary code within the context of the workflow.

p-, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could execute arbitrary code with the workflow's high privileges, including write access to contents, packages, and pull requests.

What the attacker needed

Ability to open a pull request to master

How it was found

  1. Open a pull request against the master branch, which triggers the CI workflow.
  2. The CI workflow completion triggers the release workflow via workflow_run.
  3. The release workflow reads the branch name from the pull request event data.
  4. The branch name is inserted into a shell command without sanitisation, allowing injected commands to run.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A GitHub Actions workflow is an automated script that runs when something happens in a repository, such as a pull request. Here, the script took a branch name from the pull request and pasted it directly into a shell command. Because branch names can contain special characters, an attacker could name their branch in a way that makes the shell run extra commands.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by p

View all

49 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.