GHSL-2021-009: Unauthorized repository modification or secrets exfiltration in a GitHub workflow of lijinke666/react-music-player
The GitHub workflow triggered on pull_request_target checked out and ran code from a fork, giving untrusted code access to secrets and write permissions. An attacker could modify the base repository or exfiltrate secrets.
The surge-preview.yml GitHub workflow is vulnerable to unauthorized modification of the base repository or secrets exfiltration from a Pull Request.
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 pull_request_target, which gives access to secrets and write tokens, and then explicitly checked out and ran code from the fork.
Impact
The vulnerability allows for unauthorized modification of the base repository and secrets exfiltration.
What the attacker needed
Pull request from a fork
The fix
The issue was fixed, but the text does not describe how.
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 script that runs when something happens, like a pull request. This workflow was set to run on pull requests from forks and used a token that had write access to the main repository and access to secret values. Because it also ran code from the fork, an attacker could make that code steal the secrets or change the main repository.