Skip to content
RCE Advisory Intermediate

GHSL-2020-231: Command injection in graphql-dotnet workflows

The GitHub workflow used the pull request title directly in a shell command, allowing an attacker to inject arbitrary commands. An attacker could cause a denial of service or run their own code on the GitHub Actions runner.

jarlob Follow

Originally disclosed on GitHub Security Lab

The wipcheck.yml GitHub workflow in graphql-dotnet, server, parser and authorization repositories 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

Root cause

The workflow inserted the untrusted pull request title directly into a shell command without sanitisation.

Impact

An attacker could cause a denial of service or run their own code on the GitHub Actions runner, but the workflow token had limited permissions and no access to secrets.

What the attacker needed

Ability to open a pull request

The fix

The issue was resolved by the maintainers.

How it was found

  1. Open a pull request with a title containing shell metacharacters and a command.
  2. The workflow triggers on the pull request event.
  3. The title is inserted into the bash script and the injected command runs.

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 pull request being opened. Here, the script put the pull request title straight into a command without cleaning it, so someone could put special characters in the title to run their own commands.

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.