Basic Authentication Bypassed via Simple Misconfiguration
A staging web application was protected by HTTP Basic Authentication, but the protection could be bypassed. By cancelling the browser's credential prompt repeatedly, the author reached the staging environment without valid credentials.
Bismillah al-Rahman al-Rahim Hello there, this is a M7moudx22, it’s my first write-up. Enjoy the read!
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 server only issued the authentication challenge but did not actually block requests that arrived without valid credentials, so the protected content was served regardless.
Impact
An attacker could reach the protected staging environment, which manages backend processes, without any credentials.
What the attacker needed
Access to the staging subdomain; a web browser
How it was found
- Find the staging subdomain that prompts for Basic Auth credentials.
- Try common default credentials, which do not work.
- Send a request with curl following redirects and ignoring SSL errors.
- Observe a 404 status with a WWW-Authenticate header instead of a 401.
- View the page source and open the path found there.
- Cancel the credential prompt repeatedly until the page loads with 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.
Basic Authentication is a simple login prompt built into the browser that asks for a username and password before showing a page. Here the server did not properly enforce that check, so after dismissing the prompt a few times the page loaded anyway. That means anyone could reach the protected staging site without knowing the password.
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.