Skip to content
RCE Advisory Intermediate

GHSL-2020-182: Code injection in JonathanGin52/JonathanGin52 workflow

The GitHub workflow for a Connect4 bot used the title of a public issue without sanitisation to format Ruby code, allowing an attacker to inject arbitrary Ruby code. This could let the attacker exfiltrate a temporary GitHub token and potentially modify the repository.

jarlob Follow

Originally disclosed on GitHub Security Lab

The ‘Connect4’ GitHub workflow is vulnerable to arbitrary code execution.

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 execute arbitrary Ruby code, exfiltrate a temporary GitHub token, and potentially modify the repository before the token expires.

What the attacker needed

Public GitHub issue creation

The fix

The issue was fixed by the vendor on the same day it was acknowledged.

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 created. Here, the script took the issue title and inserted it directly into Ruby code, so a malicious title could break out and run attacker-controlled commands. This is dangerous because the script has access to a temporary token that can 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.