Skip to content
Access control Write-up Intermediate

Bypass IP Whitelisting by Abusing Trusted Flows

The application enforced IP whitelisting on the normal login endpoint but not on several other session-creating flows (OAuth, invite acceptance, email-change confirmation). An attacker could obtain a valid session cookie from a non-whitelisted IP through those flows and then use it to access the platform.

medium.com

Published on medium.com

I’m kabi777 from Sudan bringing you a spicy little write-up on how I managed to bypass an IP restriction feature using nothing but pure logic, creativity, and a bit of Burp magic .

Kabi_777, 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 IP restriction was only applied to the normal login endpoint, while other session-generating endpoints (OAuth callback, invite acceptance, email-change confirmation) did not enforce it server-side.

Impact

Attackers or rogue members could gain valid sessions from anywhere, completely defeating IP restrictions, though the frontend did block the visible login attempt.

What the attacker needed

IP restriction enabled for a member; Access to a non-whitelisted IP; Ability to trigger OAuth, invite, or email change

The fix

The IP restriction should be enforced consistently on the backend for every flow that creates a session, not just the normal login endpoint.

How it was found

  1. Enable IP restriction for a member and allow only a specific IP.
  2. Try logging in from a different IP; the normal login fails.
  3. Perform the OAuth flow from the non-whitelisted IP; the frontend shows an error but the backend response includes a valid session cookie.
  4. Use the session cookie to access the API from outside the trusted IP range.
  5. Invite a new member while IP restriction is active; the invitee clicks the link from a non-whitelisted IP and the backend generates a valid session.
  6. Request an email change and click the confirmation link from a foreign IP; the backend sets a session.

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.

IP whitelisting means only computers from approved network addresses can use the service. The report shows that while the main login page checked the address, other ways of getting a session (like accepting an invite or confirming an email change) did not. So someone from an unapproved address could still get a working session and use the site.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.