Skip to content
Access control Write-up Beginner

Authentication Bypass via Information Disclosure in HTTP Headers

The application trusted a client-supplied custom HTTP header to decide whether a request came from localhost and therefore deserved admin access. An attacker could add that header to any request and reach the admin panel, performing administrative actions.

medium.com

Published on medium.com

Hello guys, after a while, sharing another simple but interesting writeup…This time, the bug was not a password issue.

Muhammed Asfan | Cybersecurity Researcher, 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

The application used a client-controlled HTTP header as the sole basis for an authorization decision.

Impact

An attacker could access restricted admin functionality and perform administrative actions such as deleting or modifying user data.

What the attacker needed

Network access to the target; ability to modify request headers

The fix

The application should validate IP information server-side, avoid using custom headers as authentication controls, enforce proper authorization checks on admin functions, and not expose internal headers through debugging methods like TRACE.

How it was found

  1. Request the admin panel normally and observe the denial message.
  2. Send a TRACE request to the admin path and note the custom IP authorization header added by the frontend.
  3. Configure a proxy rule to replace or add that header with the loopback address on every request.
  4. Request the admin panel again and receive admin access.

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.

Some websites try to decide if you are an administrator by looking at information your browser sends with every request, such as a header that claims your IP address. Here the site believed a header that anyone can set, so a visitor could simply claim to be on the local machine and be let into the admin area. The lesson is that anything the client sends can be changed by the client.

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.