GHSL-2020-364: Unauthorized repository modification or secrets exfiltration in GitHub workflows of apache/camel-website
A GitHub workflow triggered on pull_request_target checked out and ran build code from the pull request's fork, so untrusted code ran with the base repository's write token and secrets. An attacker could therefore modify the base repository or exfiltrate secrets by opening a pull request.
The pr.yaml 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 grants write access and secrets, and then explicitly checked out and ran the fork's code, so untrusted code ran in a privileged context.
What the attacker needed
Attacker can open a pull request from a fork
The fix
The issue was fixed after the report, though the text does not describe the change.
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 on a repository, such as a pull request. This one ran with powerful permissions and then executed code supplied by the person opening the pull request, so that outsider could act as if they were the project itself.