GHSL-2021-017: Command injection in teal-language/tl workflow
A GitHub Actions workflow used a pull request's branch name directly in a shell command, allowing an attacker to inject arbitrary commands. This could let them modify the base repository or steal secrets.
The playground 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
An attacker could inject commands to modify the base repository or exfiltrate secrets, such as the repository token.
What the attacker needed
Ability to open a pull request
The fix
The issue was resolved by the maintainers.
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.
When a GitHub workflow runs, it can execute shell commands. If a value controlled by an attacker, like a branch name, is inserted into a command without proper handling, the attacker can add their own commands. Here, a specially crafted branch name could run extra commands, giving the attacker access to the repository's secrets.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.