How I bypassed 403 forbidden domain using a simple trick
A subdomain returned a 403 Forbidden response, but the author found that accessing it via its CNAME record bypassed the restriction. This allowed access to a resource that was intended to be confidential.
Published on janmuhammadzaidi.medium.com
Today I’ll be demonstrating to you guys how I bypassed 403 forbidden domain using a simple trick
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 was applied only to the original hostname and not to the CNAME alias, so requests to the alias were not restricted.
What the attacker needed
Knowledge of the subdomain; ability to query DNS records
The fix
The issue was fixed by the vendor within a week.
How it was found
- Enumerate subdomains and note one returning 403.
- Try common bypass tools without success.
- Look up the CNAME record for the subdomain.
- Access the subdomain via its CNAME to bypass the 403.
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 403 Forbidden error means the server refuses to show you a page. The author discovered that the same page could be reached through a different name (a CNAME) that the server did not block, so the protection was incomplete.
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.