GHSL-2025-094: code execution in a privileged context in a GitHub workflow of faststream
The GitHub Actions workflow pr_autoupdate.yaml checks out untrusted code from a pull request and then runs pip install, which can execute a malicious setup.py. An attacker could execute arbitrary code in the privileged pull_request_target context, potentially exfiltrating the AUTOMERGE_TOKEN secret and gaining write access to contents.
A vulnerability was identified in the latest main branch of the ag2ai/faststream project where the GitHub Actions workflow prautoupdate.yaml checks out untrusted code, potentially allowing attackers to execute arbitrary code in a privileged context (GHSL-2025-094).
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
This issue may lead to code execution in a privileged context in a GitHub workflow, with the potential to exfiltrate the AUTOMERGE_TOKEN secret and write to contents.
What the attacker needed
Ability to open a pull request; workflow runs on pull_request_target
The fix
The issue was fixed in a commit.
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, like a pull request. This workflow used a setting that gives the script extra permissions and secrets, but it also downloaded and ran code from the pull request itself. That means anyone who opened a pull request could make the script run their own code with those extra permissions.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.