GHSL-2020-333: Arbitrary code execution in osohq/oso workflow
The GitHub workflow used the pull_request_target event, which grants write access to the base repository and secrets, but then explicitly checked out and ran code from the pull request's fork. An attacker could open a pull request from a fork to execute arbitrary code with those elevated permissions, allowing modification of the base repository or exfiltration of secrets.
The bench.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
Impact
The vulnerability allows for unauthorized modification of the base repository and secrets exfiltration.
What the attacker needed
Attacker can open a pull request from a fork
The fix
The issue was resolved, but the text does not describe the fix.
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 can be set to run when someone opens a pull request. The pull_request_target trigger gives the workflow powerful permissions, like writing to the main repository and reading secrets. This workflow then downloaded and ran code from the pull request itself, so an attacker could put malicious code in their pull request and have it run with those powerful permissions.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.