My first Critical (£1,200)
The web app allowed a GitHub App installation from one organisation to be linked to a different organisation, letting the second organisation access the first's private repositories. An attacker could read private code and write to it by creating branches, commits, and pull requests.
Bug Bounty
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.
Context
The target was a web application where users connect private GitHub repositories and an AI coding agent works on them. The feature at the centre of the report is the linking of GitHub App installations to organisations: an installation is meant to belong to the organisation that owns it, and the agent acts on repositories with the permissions that come with that installation.
Setup
The researcher created two organisations to test with and used their own private repository. No special tooling, versions or roles are described beyond that. The precondition for the whole test is simply the ability to create more than one organisation on the target and to connect a GitHub App installation to each.
Finding it
While looking at how GitHub App installations get tied to organisations, the researcher noticed that an installation belonging to one organisation could be linked to a different organisation. It looked like a UI bug at first, and the researcher almost skipped it.
Exploitation
Step 1: link the same installation to a second organisation
With two organisations created, the researcher linked the same GitHub App installation to the second organisation. After that, the private repository could be registered there.
Step 2: read another organisation's private code
From the second organisation, the researcher started a coding agent session. The agent cloned and read the repository. One organisation could therefore read another organisation's private code.
Step 3: test write access
The researcher then tested writing with a harmless text file. The agent created a branch, committed, pushed and opened a pull request, and the pull request showed up in the private repository.
No GitHub account was compromised. The application simply did not check which organisation actually owned the installation, and the agent used whatever permissions came with it.
Root cause
The application did not verify that the organisation linking an installation was the organisation that owned it. Because the agent then acted with the permissions attached to the installation, the missing ownership check turned into read and write access to another organisation's private repository. The application did not check which organisation actually owned the installation.
Impact
Under the conditions tested, one organisation could read another organisation's private code and write to it: the agent created a branch, committed, pushed and opened a pull request in the private repository. No GitHub account was compromised; the access came from the installation's own permissions. The report does not state which organisations or repositories beyond the researcher's own were affected, or whether the issue required any particular role in the second organisation.
Fix
The report does not say what was changed.
Variants to test
- Link an installation owned by organisation A to organisation B and try to register a private repository from A there. A positive result is the repository appearing in B's list.
- Start an agent session from the second organisation against the registered repository. A positive result is the agent cloning and reading code it should not see.
- Test write access with a harmless file. A positive result is a branch, commit, push and pull request appearing in the other organisation's repository.
Timeline
The report was sent on Sunday, June 14 at 11:58 PM. The reply came on Tuesday night, June 16, a little after 9. More evidence for the write impact was sent later. The researcher then cleaned up: deleted the branches, closed the pull request, and removed the test integrations and repository records.
What happened, in plain words
A security researcher found a bug in a web application that lets people connect their private GitHub repositories and then have an AI coding agent work on that code. The application was supposed to keep each organisation's repositories separate. It did not. An installation that belonged to one organisation could be linked to a second organisation, and from that second organisation the AI agent could read the first organisation's private code and even write to it.
The researcher reported it, and the title of the write-up gives £1,200. No GitHub account was broken into. The application simply never checked who really owned the installation.
This article walks through the whole thing from zero, explaining each idea as it comes up.
The pieces you need to know first
Before the steps make sense, a few everyday ideas.
- GitHub is a website where people and companies store code. A repository (repo) is one project's folder of code plus its history of changes. A private repository is one only invited people can see.
- An organisation on GitHub (and on the target application) is a shared account that groups people and repositories, like a company department. Two organisations are two separate worlds; code in one should not be visible from the other.
- A GitHub App installation is a way to give an outside application permission to act on an organisation's repositories. Think of it as a key card handed to a contractor: the card says which building it opens and what the holder may do inside. The application that receives the card is trusted to use it only for that building.
- An AI coding agent is a program that reads code and makes changes on its own when told to, for example "read this repository" or "make a small change and propose it".
- A pull request (PR) is a proposal to add changes to a repository. It shows up in the repository so the owners can review it before it is merged.
- A branch is a parallel copy of the code where changes can be made without touching the main version.
- A commit is a saved change with a short message describing it.
- A push means sending those saved changes up to the server so others can see them.
- An API is the way programs talk to a website without a human clicking buttons. If the website's pages are the front desk, the API is the service window where requests are handed over in a fixed format. A check that exists only in the pages (the UI) can be missing at the service window.
- The UI (user interface) is what you see and click in the browser.
- Server-side validation means the website's own computers re-check a request before acting on it. If the check happens only in the browser, anyone can skip it.
Context
The target was a web application where users connect private GitHub repositories and an AI coding agent works on them. The feature at the centre of the report is the linking of GitHub App installations to organisations: an installation is meant to belong to the organisation that owns it, and the agent acts on repositories with the permissions that come with that installation.
In plain words: the application lets you attach a key card (the installation) to a department (the organisation). The application is supposed to make sure the card really belongs to that department before accepting it. The agent then uses the card's permissions to work on the code.
Setup
The researcher created two organisations to test with and used their own private repository. No special tooling, versions or roles are described beyond that. The precondition for the whole test is simply the ability to create more than one organisation on the target and to connect a GitHub App installation to each.
Why two organisations? Because a separation bug can only be shown if there are two separate things that should stay apart. Using their own private repository meant the researcher was never touching anyone else's data, which is the safe and ethical way to test.
Finding it
While looking at how GitHub App installations get tied to organisations, the researcher noticed that an installation belonging to one organisation could be linked to a different organisation. It looked like a UI bug at first, and the researcher almost skipped it.
Why "just a UI bug"? A display glitch, where a page shows the wrong name or the wrong label, is usually harmless. The researcher's instinct was that this might be only cosmetic. The important question was whether the application actually accepted the wrong link and then acted on it. That is what the next steps test.
Exploitation
Step 1: link the same installation to a second organisation
With two organisations created, the researcher linked the same GitHub App installation to the second organisation. After that, the private repository could be registered there.
Why this step matters: if the application had checked ownership properly, the link would have been refused. It was not refused, and the private repository could then be registered there. That is the first sign the problem is real and not cosmetic.
Step 2: read another organisation's private code
From the second organisation, the researcher started a coding agent session. The agent cloned and read the repository. One organisation could therefore read another organisation's private code.
Why start an agent session? Because the agent is the part that actually uses the installation's permissions. If the agent can fetch the code, then the wrong link has turned into real access, not just a wrong label on a page. "Cloned" means the agent made its own copy of the repository to work on.
Step 3: test write access
The researcher then tested writing with a harmless text file. The agent created a branch, committed, pushed and opened a pull request, and the pull request showed up in the private repository.
Why a harmless text file? To prove the impact without damaging anything. A file with no meaning in it shows that writing is possible, while leaving the real code untouched. The pull request appearing in the private repository is the proof: a change proposed from the second organisation landed in the first organisation's project.
No GitHub account was compromised. The application simply did not check which organisation actually owned the installation, and the agent used whatever permissions came with it.
That last sentence is the heart of it. Nobody stole a password. The key card was valid; it was just handed to the wrong department, and the application never asked whether that was allowed.
Root cause
The application did not verify that the organisation linking an installation was the organisation that owned it. Because the agent then acted with the permissions attached to the installation, the missing ownership check turned into read and write access to another organisation's private repository. The application did not check which organisation actually owned the installation.
In everyday terms: the receptionist accepted a key card for building A at the desk of building B, because nobody compared the name on the card with the name on the door.
Impact
Under the conditions tested, one organisation could read another organisation's private code and write to it: the agent created a branch, committed, pushed and opened a pull request in the private repository. No GitHub account was compromised; the access came from the installation's own permissions. The report does not state which organisations or repositories beyond the researcher's own were affected, or whether the issue required any particular role in the second organisation.
Why this is serious: private code is often a company's most valuable asset. Being able to read it means seeing secrets, business logic and unfinished work. Being able to write to it means being able to propose changes that, if merged, would run in the real product.
Fix
The report does not say what was changed.
Doing the check only in the browser is like putting a sign on the door and hoping nobody walks around it.
Variants to test
These are the same ideas, written as a checklist someone else could repeat.
- Link an installation owned by organisation A to organisation B and try to register a private repository from A there. A positive result is the repository appearing in B's list.
- Start an agent session from the second organisation against the registered repository. A positive result is the agent cloning and reading code it should not see.
- Test write access with a harmless file. A positive result is a branch, commit, push and pull request appearing in the other organisation's repository.
Timeline
The report was sent on Sunday, June 14 at 11:58 PM. The reply came on Tuesday night, June 16, a little after 9. More evidence for the write impact was sent later. The researcher then cleaned up: deleted the branches, closed the pull request, and removed the test integrations and repository records.
Why clean up? Test data left behind can confuse the owners of the application and can look like an attack. Deleting the branches, closing the pull request and removing the test integrations and repository records puts everything back the way it was.
Glossary
- API: the way programs talk to a website directly, without a human clicking through pages.
- Branch: a parallel copy of a repository's code where changes can be made safely.
- Bug bounty: a programme that pays researchers for reporting security problems responsibly.
- Commit: a saved change to code, with a short description.
- GitHub: a website for storing and sharing code.
- GitHub App installation: a grant of permission that lets an outside application act on an organisation's repositories.
- Impact: what an attacker could actually do if the bug were abused.
- Organisation: a shared account that groups people and repositories, like a department.
- Private repository: a code project only invited people can see.
- Pull request (PR): a proposal to add changes to a repository, shown for review.
- Push: sending saved changes from your copy up to the server.
- Repository (repo): one project's folder of code and its history.
- Root cause: the underlying mistake that makes the bug possible.
- Server-side validation: a check performed by the website's own computers, not just the browser.
- UI (user interface): the pages and buttons you see and click in a browser.
- Variant: another way of trying the same bug, to see whether the fix covers every path.