GHSL-2020-186: Command injection in thomaseizinger/github-action-gitflow-release-workflow
The GitHub workflow used the title of a public issue to format a shell command without sanitisation, allowing an attacker to inject arbitrary commands. An attacker could exfiltrate the temporary GitHub token and potentially modify the repository.
The ‘draft-new-release.yml’ GitHub workflow is potentially vulnerable to arbitrary command injection, that may lead to the repository being compromised.
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 exfiltrate the temporary GitHub token and potentially modify the repository, though the token expires after the workflow finishes.
What the attacker needed
Public issue creation; title starts with 'Release version'; issue has 'release' label; user login is substring of whitelist
The fix
The issue was fixed by the vendor.
How it was found
- Create a public issue with a title starting with 'Release version' and containing a malicious payload.
- The workflow triggers and runs the injected command.
- The command exfiltrates the temporary GitHub token to an attacker-controlled server.
- The attacker uses the token to modify the repository before the workflow finishes.
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 new issue. Here, the workflow took the issue title and put it directly into a shell command. Because the title wasn't cleaned, someone could put special characters in the title to run their own commands on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.