Skip to content
RCE Advisory Intermediate

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.

jarlob Follow

Originally disclosed on GitHub Security Lab

The ‘draft-new-release.yml’ GitHub workflow is potentially vulnerable to arbitrary command injection, that may lead to the repository being compromised.

jarlob, on GitHub Security Lab

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

  1. Create a public issue with a title starting with 'Release version' and containing a malicious payload.
  2. The workflow triggers and runs the injected command.
  3. The command exfiltrates the temporary GitHub token to an attacker-controlled server.
  4. 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.

More by jarlob

View all

192 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.