Insecure default settings left in place - DEBUG mode on, the admin panel exposed, missing security headers, and an open ALLOWED_HOSTS. Each test probes a separate configuration failure. All 6 tests are Postman-compatible.
Security misconfiguration is one of the most prevalent vulnerability classes (OWASP A05:2021). It covers any setting that was left at an insecure default or was never configured at all - verbose error pages in production, exposed admin interfaces, missing HTTP security headers, overly permissive host validation, and unused features left enabled. Unlike injection bugs, these require no exploit logic - the misconfiguration itself is the vulnerability.
| Test 1 | DEBUG=True - error endpoint returns a full stack trace with internal paths and settings values (bug) |
| Test 2 | Django admin panel is reachable at /admin/ with no additional auth layer or IP restriction (bug) |
| Test 3 | X-Frame-Options header is absent - page can be embedded in an iframe (bug) |
| Test 4 | Content-Security-Policy header is absent - no script source restrictions (bug) |
| Test 5 | ALLOWED_HOSTS=['*'] - injected Host header is reflected in a generated password reset link (bug) |
| Test 6 | A hardened endpoint correctly sets all four security headers (true positive) |
/admin/ without any extra restriction.X-Frame-Options header is returned. Without it the page can be embedded in a transparent iframe.Content-Security-Policy header is present. Absence of CSP removes the last line of defense against XSS.Host header to build password reset links without validation.
Postman users: set a custom Host header to see your value reflected in the generated link.
The button below simulates sending the current host.
X-Frame-Options, Content-Security-Policy, X-Content-Type-Options, and Referrer-Policy.debug_info.settings_leak - note the
leaked SECRET_KEY and DATABASE_URL.
/admin/ in the browser to
confirm the login form loads without any challenge.
Host header set to
evil.attacker.com and check that value appears in
generated_reset_link in the response.
All tests use GET /qa-sandbox/security-misconfig/?action=<action>. No auth or body required.
GET /qa-sandbox/security-misconfig/?action=debug-error
GET /qa-sandbox/security-misconfig/?action=check-admin
GET /qa-sandbox/security-misconfig/?action=check-xframe # Inspect response headers tab - X-Frame-Options should be absent
GET /qa-sandbox/security-misconfig/?action=check-csp # Inspect response headers tab - Content-Security-Policy should be absent
GET /qa-sandbox/security-misconfig/?action=host-inject Host: evil.attacker.com # Expected: generated_reset_link contains evil.attacker.com
GET /qa-sandbox/security-misconfig/?action=check-secure # Response headers should include: # X-Frame-Options: DENY # Content-Security-Policy: default-src 'self' # X-Content-Type-Options: nosniff # Referrer-Policy: strict-origin-when-cross-origin