Access Control
The application used the client-controlled Referer header as part of its authorization decision for the administrative interface. An authenticated user could add a Referer value pointing to an internal page and gain access to admin functionality without the required privileges.
medium.com
Published on medium.com
Have you ever visited a website to access a resource and received a 403 Forbidden error? This usually means the resource exists, but you don’t have the necessary permissions to access it.
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
The application based an authorization decision on the client-controlled Referer header instead of checking the user's role or permissions on the server.
Impact
An authenticated user without admin privileges could access the administrative interface, potentially viewing sensitive data, changing settings, managing accounts, and reaching further endpoints; the text does not say whether any defence limited this.
What the attacker needed
An authenticated account; ability to modify request headers
The fix
Access control should be enforced on the server side, tied explicitly to the user's identity and roles, and checked for every request rather than trusting client-controlled headers.
How it was found
- Notice that requests to internal pages include a Referer header pointing to specific internal URLs.
- Capture a legitimate request from the main application and reuse its Referer header.
- Send a request to the restricted admin endpoint with the modified Referer header.
- Observe that the application grants access to the administrative page.
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.
Access control is the rule that decides who is allowed to see or change what. Here the website checked a header called Referer, which the browser sends to say where a request came from, but the user can change it freely. By pretending the request came from an internal page, a normal user could open the admin area.
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.