Skip to content
Access control Write-up Beginner

403 forbidden bypass & Accessing config files using a header

A configuration endpoint returned 403 Forbidden, but adding an X-License-Key header seen in other requests made the server return the configuration file. The file contained sensitive information about the target.

vishnurajr Follow

Published on medium.com

My name is vishnurajr, This is my first writeup, How i found a bypass for 403 FORBIDDEN !

ᴠɪꜱʜɴᴜʀᴀᴊʀ, 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 access control on the config endpoint relied on the presence of a client-supplied header rather than proper authorisation checks.

Impact

An attacker could gain sensitive information about the target from the exposed configuration file.

What the attacker needed

Access to the target's web traffic; knowledge of the config endpoint

The fix

The header was removed from every request, which fixed the issue.

How it was found

  1. Find the config endpoint through archived URLs
  2. Request the endpoint and receive a 403 Forbidden response
  3. Try common 403 bypasses, which all fail
  4. Notice the X-License-Key header in other requests in Burp history
  5. Add the same header to the config endpoint request and get the config file

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 server can refuse a request with a 403 error, meaning 'you are not allowed'. Here the server only checked for a special header that the app normally sends, so anyone who added that header was let in. The header acted like a password that was easy to copy from normal traffic.

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.