GHSL-2025-080: Untrusted pull request code execution in the nf-core/tools changelog workflow
The changelog workflow could be triggered by an attacker via a pull request or issue comment and would check out and execute code from the pull request with write permissions. An attacker could run arbitrary code and potentially push commits to the main branch, leading to full repository takeover.
Originally disclosed on GitHub Security Lab
The nf-core/tools project was vulnerable in its main version (commit https://github.com/nf-core/tools/commit/75e643ad2c62cdc8ecd39aa56c0c314efd4b13e4) because the changelog.yml workflow could run untrusted code.
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 used a privileged trigger (pull_request_target and issue_comment) and then checked out and executed code from the untrusted pull request.
Impact
This issue may lead to full repository takeover, as the attacker could run arbitrary code and push new commits to the main branch.
What the attacker needed
Ability to open a pull request or comment
The fix
The workflow should not check out or execute untrusted pull request code with write permissions; a fix was created and later merged.
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, like a new pull request. This workflow ran code from the pull request itself, so anyone who opened a pull request could make the workflow run their own commands with the repository's write access, which is like giving a stranger the keys to the building.