1 Debug Mode Information Disclosure
Debug mode in web frameworks provides detailed error information to help developers troubleshoot. In production, this information is invaluable to attackers.
Django DEBUG=True leak:
# When DEBUG=True and an error occurs, Django exposes:
# - Full Python stack trace with local variable values
# - All settings (including SECRET_KEY, DATABASE, API keys)
# - File paths on the server
# - SQL queries that caused errors
# - Environment variablesFlask debug mode:
app.run(debug=True) # Exposes Werkzeug debugger
# Attackers can access an interactive Python console!
# Complete server compromise if Werkzeug debugger is accessibleExpress.js in development mode:
app.use((err, req, res, next) => {
res.status(500).send(err.stack); // Stack trace to all users!
});Even if debug mode is not explicitly enabled, error handlers that return stack traces or internal paths create the same information disclosure risk.