Skip to content
Advisory Intermediate

GHSL-2025-077: Potential code execution in privileged runner in Beeware

The CI workflow runs on pull_request_target with write permissions and checks out the PR branch, then installs dependencies from a requirements.txt controlled by the PR author. An attacker could execute arbitrary code in the privileged runner, potentially modifying the repository or exfiltrating secrets.

sylwia-budzynska Follow

Originally disclosed on GitHub Security Lab

The beeware/beeware.github.io project is vulnerable in its CI pipeline (ci.yml) to untrusted actions checkout, potentially allowing supply chain attacks.

sylwia-budzynska, 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

Root cause

The workflow uses pull_request_target (which gives write access to secrets) and checks out the untrusted PR branch, then runs pip install on a requirements.txt from that branch.

Impact

An attacker could execute arbitrary code with a privileged token and access to secrets, potentially leading to unauthorized repository modification or secret exfiltration; the need for a maintainer to apply the 'preview' label mitigates but does not eliminate the risk, as race conditions are possible.

What the attacker needed

Ability to open a pull request; maintainer adds 'preview' label

The fix

The issue was fixed by merging a pull request that likely removes the unsafe checkout and dependency installation from the privileged workflow.

How it was found

  1. Create a pull request with a malicious requirements.txt in the branch.
  2. Wait for a maintainer to add the 'preview' label to trigger the workflow.
  3. The workflow checks out the PR branch and runs pip install -r requirements.txt, executing the malicious code.

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 a set of automated steps that run when something happens, like a pull request. This workflow was set up to run with high privileges and to use files from the pull request itself, so someone could sneak in malicious code that runs with those privileges.

More by sylwia-budzynska

View all

27 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.