GHSL-2021-048: Unauthorized repository modification or secrets exfiltration in several GitHub workflows of linebender
A GitHub workflow in several linebender repositories ran on issue comments and built code from a pull request in a privileged context. An attacker could therefore modify the base repository or exfiltrate secrets by triggering that build.
The bloat.yml GitHub workflow in linebender/druid, linebender/runebender and linebender/norad is vulnerable to unauthorized modification of the base repository or secrets exfiltration.
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
Likely the workflow was triggered by a comment and built untrusted pull request code while holding a write token and secrets, without isolating that build from the privileged context.
Impact
The workflow had access to the write repository token and secrets, so an attacker could modify the base repository or exfiltrate secrets.
What the attacker needed
Comment on a pull request; workflow runs on issue comments
The fix
The issue was fixed, though the text does not describe the change.
How it was found
- A user comments on a pull request, which triggers the workflow.
- The workflow checks out the pull request code.
- The workflow builds the potentially untrusted code in a privileged environment.
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 workflow is an automated job that runs when something happens on a repository, such as a new comment. This one built code from a pull request while holding powerful credentials, so someone who could get the job to run could abuse those credentials to change the repository or steal secrets.