Github Account Takeover of "mozilla-release-automation-bot" from "github.com/mozilla-mobile/fenix"
A release checklist template in a Mozilla repository told maintainers to grant write access to a named GitHub bot account, but that account had never been registered. The reporter registered the unclaimed username and could therefore receive write access to Mozilla branches when the template was followed.
Originally disclosed on Mozilla
- Fixed in 54 days
- Paid in 3 months
- Disclosed after 54 days
Summary
One of the repository of mozilla https://github.com/mozilla-mobile/fenix have a Sprint template. In that template one part is to give access to mozilla release bot github acccount. That github account was not registered on github.com So I was able to takeover the account and host PoC
Steps
- Go to https://github.com/mozilla-mobile/fenix/blob/main/.github/ISSUE_TEMPLATE/release_checklist.md#sprint-x1-end-wednesday-2nd-week-cutting-a-beta
- Search for
Grant mozilla-release-automation-bot write access to this branch. - Click on
mozilla-release-automation-bot - You will be taken to this repositoy https://github.com/mozilla-release-automation-bot where you will see the takeover message
PoC
- https://github.com/mozilla-release-automation-bot
- https://github.com/mozilla-mobile/fenix/blob/main/.github/ISSUE_TEMPLATE/release_checklist.md#sprint-x1-end-wednesday-2nd-week-cutting-a-beta
Impact
An attacker can takeover the account and when someone uses the template for sprint from the repository, they will end up giving access to attacker which can lead to malicious codes getting uploaded in mozilla repositories
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
Likely the template referenced a bot account by name without anyone registering that account first, leaving the username free to be claimed by anyone.
Impact
An attacker holding the account could be granted write access by staff following the template, which could lead to malicious code being pushed into Mozilla repositories.
What the attacker needed
Staff follow the release checklist; attacker claims the free username first
The fix
The bot account should be registered and controlled by the project, and the template should point to that verified account before any access is granted.
How it was found
- Open the release checklist template in the Mozilla repository.
- Find the line instructing staff to grant write access to the bot account.
- Click the bot account name in that line.
- The link leads to the reporter's claimed account showing the takeover message.
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 project's release checklist told staff to give write permission to a helper account on GitHub. Nobody had actually created that account, so its name was free for anyone to claim. The reporter claimed it, meaning future staff following the checklist would hand write access to the reporter instead of a trusted bot.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.