Skip to content
Leaked secrets Write-up Beginner

$50K Bounty Just for GitHub Access Token exposure

A GitHub access token was found inside an Electron application's packaged files, and the token was still valid. The attacker could use it to access the Shopify organisation's private repositories with push and pull permissions.

hrofficial62 Follow

Published on medium.com

Hi Hackers, Welcome back to my another article. Do you think about $50K bounty?

Mr Horbio, 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 a developer hardcoded a GitHub personal access token in a .env file that was bundled into the Electron app's asar archive, making it extractable by anyone with the app.

Impact

The token allowed access to both public and private Shopify repositories with push and pull permissions, so an attacker could read private code and potentially modify it.

What the attacker needed

Download the Electron app; Extract the app.asar archive

How it was found

  1. Extract the app.asar file from the Electron app.
  2. Locate the .env file in the extracted contents.
  3. Find the GitHub token variable in that file.
  4. Use the token to authenticate to the GitHub API and check the user endpoint.
  5. Query the organisations endpoint to see which organisation the token belongs to.
  6. List the organisation's repositories to confirm the token's permissions.

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.

A GitHub token is like a password that lets a program read or change code repositories. Here, someone had left such a token inside a desktop app, so anyone who downloaded the app could find it and use it to reach the company's private code. The token gave read and write access to those repositories.

What is Leaked secrets?

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.

More by hrofficial62

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.