Skip to content
Account takeover Write-up Intermediate

Api Again Org Takeover

A personal access token creation flow returned an OIDC authentication URL that, when visited by another user, generated a token in the attacker's dashboard with that user's permissions. An attacker could send this URL to an admin to gain full control over the organisation.

callgh0st Follow

Published on infosecwriteups.com

Hello, Callgh0st Here. I discovered an interesting and impactful bug in a program.

callgh0st, on infosecwriteups.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 OIDC authentication endpoint used for token creation did not bind the token to the original requester, allowing any user who visited the URL to have their permissions granted to the attacker's token.

Impact

An attacker could gain a token with the permissions of any user who clicks the link, potentially leading to full organisation takeover if an admin clicks it.

What the attacker needed

Attacker has an account; victim clicks a link

How it was found

  1. Create a personal access token on developer.rafah.com and observe the 302 response containing an OIDC URL.
  2. Leave the organisation and resend the token creation request to obtain the OIDC URL again.
  3. Send the OIDC URL to another user and have them click it.
  4. Observe that a token with the other user's permissions appears in the attacker's dashboard.

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 create an API token, the system should only give it to you. Here, the system created a special login link that, if opened by someone else, would create a token for the attacker with that person's permissions. This means an attacker could trick an admin into clicking the link and then take over the organisation.

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.

More by callgh0st

View all

5 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.