Debug mode enabled in production exposes security vulnerabilities
criticalsecurityUpdated Mar 24, 2026
Technologies:
How to detect:
Running Flask with FLASK_ENV=development or debug mode enabled in production environment displays detailed error traces and enables interactive debugger, exposing internal application details to attackers.
Recommended action:
Set FLASK_ENV to 'production' (or omit it) before deploying. Ensure debug mode is off. Never run 'flask run' directly in production; use production WSGI servers like Gunicorn or uWSGI instead.