Exploiting Django Debug Mode for Unrestricted Access to the Internal Dashboard?
A Django application was deployed with debug mode enabled, so its error pages disclosed internal endpoints. One of those endpoints, an admin dashboard path, was accessible without authentication, letting an attacker view the internal Cloud Cost Scheduler dashboard and its data.
Published on rokkamvamsi18.medium.com
I hope you all are doing well. Myself Rokkam Vamshi, a Security Researcher.
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 Django application was deployed with debug mode enabled, and an internal dashboard endpoint lacked authentication.
Impact
An unauthenticated attacker could view the internal Cloud Cost Scheduler dashboard and all the information it displayed.
What the attacker needed
Target uses Django with debug mode on; internal dashboard endpoint lacks auth; attacker can reach the endpoint
The fix
The security team resolved the vulnerability, though the text does not state the exact fix; it should be fixed by disabling debug mode in production and requiring authentication on the dashboard.
How it was found
- Find subdomains built with Django using technology fingerprinting and Shodan searches.
- Append random text to the root URL to check whether debug mode is enabled by looking for a non-standard 404 page.
- Read the internal endpoints disclosed on the debug error page.
- Try each disclosed endpoint by appending it to the root URL.
- Access the admin dashboard endpoint and get redirected to the dashboard without authentication.
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.
Django is a tool for building websites. When a setting called debug mode is left on in a live site, the site shows detailed error pages that can list hidden parts of the application. The researcher found one of those hidden pages was an admin dashboard that did not ask for a login, so anyone who knew the address could open it.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.