Skip to content
RCE Write-up Intermediate

The $2500 bug: Remote Code Execution via Supply Chain Attack

An abandoned GitHub account referenced in multiple projects' setup instructions was registered by the researcher, who then added malicious code to repositories that developers were told to clone. Developers following the instructions would execute the attacker's code on their own machines.

medium.com

Published on medium.com

Recently, while hunting on a private program hosted on the HackerOne platform, I discovered a critical Remote Code Execution (RCE) vulnerability(For privacy reasons, I will use the word “redacted” in place of the actual program name.)

Naveen kumawat, on medium.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the project documentation pointed to a GitHub account that had become unclaimed, allowing anyone to register it and control the code that users were instructed to download and run.

Impact

Any developer who followed the setup instructions could have had arbitrary code executed on their machine, though the severity was downgraded because user interaction was required.

What the attacker needed

Victim follows setup instructions; victim clones from the unclaimed account; victim runs make deploy or the app

The fix

The ownership of the hijacked account was transferred back and references to it were removed, and the vulnerability was resolved.

How it was found

  1. Find repositories whose instructions tell users to clone from an unclaimed GitHub account.
  2. Register the abandoned GitHub account.
  3. Upload a malicious Makefile and script to the repository.
  4. When a user runs the documented deploy command, the Makefile downloads and executes the script.
  5. The script sends the user's username, OS details and working directory to an attacker server.

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 write-up has not been written yet. The Original tab links to the source.

When you install software, you often copy commands from a project's instructions that download code from the internet. If the place that code comes from is no longer controlled by the original authors, someone else can take it over and put harmful code there. Anyone who then follows the instructions runs that harmful code on their own computer.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

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.