Skip to content
RCE Advisory Intermediate

GHSL-2020-184: Command injection in bdougie/awesome-black-developers workflow

The GitHub workflow for the awesome-black-developers repository used the body of a public issue directly in a shell command without sanitisation. An attacker could inject commands to exfiltrate the temporary GitHub token and use it to modify the repository.

jarlob Follow

Originally disclosed on GitHub Security Lab

The ‘Readme’ GitHub workflow is vulnerable to arbitrary command injection.

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 use it to modify the repository, though the token expires after the workflow finishes.

What the attacker needed

Public GitHub issue creation

The fix

The issue was resolved by the vendor.

How it was found

  1. Create a public issue with a specially crafted body that injects shell commands.
  2. The workflow runs and executes the injected commands, sending the GitHub token to an attacker-controlled server.
  3. The attacker uses the token to add or modify files in the repository.

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 being opened. Here, the script took the text of the issue and put it straight into a command, so an attacker could include special characters that made the script run their own commands. This let them steal a temporary password (token) that allowed them to change the repository.

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.