Skip to content
RCE Advisory Intermediate

GHSL-2020-194: Command injection in drewmullen/actions-playground workflows

Two GitHub Actions workflows took the text of a pull request comment and inserted it directly into a bash script, so a commenter could inject extra shell commands. An attacker could run arbitrary commands on the build runner and potentially steal secrets it uses.

jarlob Follow

Originally disclosed on GitHub Security Lab

The comment.yml and outputcomment.yml GitHub workflows are 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 interpolated untrusted comment text directly into a shell script instead of passing it as a safely quoted value.

Impact

Arbitrary commands could run on the build runner, potentially allowing exfiltration of secrets, and the attacker could edit the comment afterwards to hide the activity.

What the attacker needed

Ability to comment on a pull request; comment starts with trigger word

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.

GitHub Actions are automated jobs that run when something happens, such as a new comment. Here the job copied the comment text straight into a shell command, so characters like a semicolon let the commenter add their own commands. That means someone who can comment could run code on the machine doing the build.

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.