Medium severityPythonOther Security ChecksMEDIUM confidence
Flask Debug Enabled
Running Flask with debug=True exposes the Werkzeug interactive debugger, which allows remote code execution and leaks source/config (CWE-489).
Standards mapping
- OWASP Top 10
- A05:2021 - Security Misconfiguration
- OWASP ASVS
- V14.3.2 (L1)
Vulnerable vs. safe
Flagged by this check
app.run(debug=True)Passes - the safe pattern
app.run(debug=False)Why it matters & how to fix it
Running Flask with debug=True exposes the Werkzeug interactive debugger, which allows remote code execution and leaks source/config (CWE-489). Never enable debug in production; gate it behind an environment variable.
References
Rule ID integsec-python-flask-debug-enabled - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentestRelated checks
- JavaScript / TypeScript - Other Security ChecksChild Process Shell True
- JavaScript / TypeScript - Other Security ChecksOpen Redirect Tainted Input
- Python - Other Security ChecksDjango Mark Safe
- Python - Other Security ChecksFlask Render Template String
- Python - Other Security ChecksInsecure Tempfile Mktemp
- Python - Other Security ChecksJinja2 Autoescape Off