Skip to content
RCE Advisory Intermediate

GHSL-2020-190: Command injection in fortran-lang/fortran-lang.org workflow

A GitHub workflow used the text of a public issue comment to build a shell command without sanitisation, so a user could inject arbitrary commands. An attacker could exfiltrate environment variables to a server they control.

jarlob Follow

Originally disclosed on GitHub Security Lab

The ‘gentweet.yaml’ 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

Root cause

The workflow inserted untrusted comment text directly into a shell command without escaping or validation.

Impact

An attacker could run arbitrary commands on the workflow runner and exfiltrate environment variables to a server they control.

What the attacker needed

Public GitHub repository; ability to comment on a pull request

The fix

The issue was fixed by the vendor.

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 on a repository, such as a new comment. Here, the workflow took the comment text and pasted it directly into a shell command. Because the comment is public, anyone could add extra shell commands that would run on the project's servers.

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.