€1500 bounty — How I Bypassed 403 Forbidden and Gained Ac
The intranet portal authenticated users solely by the PHPSESSID cookie, and the same session identifier was accepted across the extranet and intranet. An attacker with a low-privilege extranet account could swap their extranet PHPSESSID into intranet requests to gain full intranet access and perform CRUD operations on sensitive data.
Published on medium.com
Hello! I’m Ashar Mahmood, a 23-year-old cybersecurity researcher who loves diving deep into access control flaws and broken authentication mechanisms.
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 intranet portal relied only on the presence of a valid PHPSESSID from the shared session store, without checking the user's role or which application issued the session.
Impact
A low-privilege external user could view and edit internal user profiles and create, edit, or delete CRM organisation records, effectively acting as an intranet administrator.
What the attacker needed
A free extranet account; ability to intercept and modify HTTP requests
How it was found
- Register and log in to the extranet portal to obtain a valid session.
- Visit an intranet endpoint while logged in and observe a 403 Forbidden response.
- Inspect HTTP history and notice the intranet sets a different PHPSESSID than the extranet.
- Intercept an intranet request and replace its PHPSESSID with the extranet session's PHPSESSID.
- Forward the request and observe a 200 OK with the intranet UI loading.
- Use Burp Suite Match & Replace to automatically swap the cookie on subsequent requests.
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.
A website often uses a cookie to remember who you are after you log in. Here, the intranet site trusted any cookie value that matched a valid extranet session, so a normal external user could pretend to be an internal employee by changing one cookie. This let them read and change internal records.
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.