flask-werkzeug-attack

flask-werkzeug-attack is a skill for Claude Code, Codex from uphiago/recon-skills. It costs 22 tokens per session (1,896 once invoked), scanned B, original, MIT.

A guide to testing whether an exposed Flask/Werkzeug debug page reveals error details or secrets. Flask is a Python web framework, and Werkzeug is one of its underlying web components.

In plain words
What is it for?
Checking exposed Flask services for debugger pages, triggering error responses, and identifying leaked tracebacks, secrets, or console access.
Why use it?
A production debug page can disclose stack traces, configuration secrets, or an interactive console to anyone who can reach it.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Checking exposed Flask services for debugger pages, triggering error responses, and identifying leaked tracebacks, secrets, or console access.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/uphiago/recon-skills/flask-werkzeug-attack
About the project

Recon Skills is a pack of security-testing skills covering reconnaissance, web applications, APIs, authentication, vulnerability validation, cloud infrastructure, and reporting. Security professionals use it for authorized assessments of systems they own or have written permission to test. The catalogue entries are individual skills from the pack.

uphiago/recon-skills · 1,254 stars · on GitHub · hiago.sh

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add uphiago/recon-skills --skill flask-werkzeug-attack
Clone the repo
git clone --depth 1 https://github.com/uphiago/recon-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for flask-werkzeug-attack

README.md
[![agentmods](https://agentmods.dev/badge/skills/uphiago/recon-skills/flask-werkzeug-attack/github.svg)](https://agentmods.dev/skills/uphiago/recon-skills/flask-werkzeug-attack)
Your own site
<a href="https://agentmods.dev/skills/uphiago/recon-skills/flask-werkzeug-attack"><img src="https://agentmods.dev/badge/skills/uphiago/recon-skills/flask-werkzeug-attack/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for flask-werkzeug-attack

Your own site · 80×15
<a href="https://agentmods.dev/skills/uphiago/recon-skills/flask-werkzeug-attack"><img src="https://agentmods.dev/badge/skills/uphiago/recon-skills/flask-werkzeug-attack.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,896 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 173
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Tool Misuse · line 76
    Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
    Fix: Override unsafe defaults with secure settings (verify=True, auth required, restrictive permissions). Review and harden all tool configurations.
  • medium Data Exfiltration · line 108
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.01896
Opus 5 $0.00011 $0.00948
Sonnet 5 $0.00004 $0.00379
Haiku 4.5 $0.00002 $0.00190

Measured 11d ago against content hash 4c7fc78664c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

flask-werkzeug-attack scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Encoded or obfuscated payloadmediumSupply chain

base64 or hex that is decoded and executed hides what actually runs from anyone reading the file.

-d "code=__import__('os').system('id')"

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- `terminal` with curl
recon/flask-werkzeug-attack/SKILL.md · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Flask/Werkzeug Debugger Exploitation

Flask 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).

When to Use

  • Port scan reveals an unknown HTTP service on a non-standard port (8080, 8081, 8084, 5000, 8000, etc.)
  • An API endpoint returns HTTP 500 with a Flask/Werkzeug error page
  • A ?__debugger__=yes parameter appears in URL resources (CSS, JS, PNG)
  • The error page contains var CONSOLE_MODE, var EVALEX, or SECRET= in the HTML

Prerequisites

  • terminal with curl
  • A Flask API server with debug=True in production (misconfiguration)
  • An endpoint that triggers HTTP 500 (unhandled exception)

Quick Detection

# Check if Werkzeug debugger is active — trigger an error
curl --max-time 30 --connect-timeout 10 -sk "https://target.com:PORT/sitemap.xml" 2>/dev/null | grep -oE "(Werkzeug|Debugger|SECRET|CONSOLE_MODE|EVALEX)" | head -5

# Try to trigger error on common paths
for path in "/error" "/500" "/test" "/debug" "/sitemap.xml" "/env" "/config"; do
  result=$(curl --max-time 30 --connect-timeout 10 -sk "https://target.com:PORT$path" 2>/dev/null)
  if echo "$result" | grep -q "Traceback\|Error\|Werkzeug"; then
    echo "TRIGGERED: $path"
    echo "$result" | grep -oE '(File|Error|SECRET|CONSOLE_MODE|EVALEX)[^<]*' | head -5
  fi
done

Phase 1 — Information Disclosure

The Werkzeug debugger exposes:

1a — Server Paths (from Traceback)

File "/var/www/html/target-app-backend/venv/lib/python3.10/site-packages/flask/app.py"
File "/var/www/html/target-app-backend/venv/lib/python3.10/site-packages/flask_cors/extension.py"
File "/var/www/html/target-app-backend/venv/lib/python3.10/site-packages/..."

1b — Debugger SECRET (from HTML)

<script>
  var CONSOLE_MODE = false,
      EVALEX = false,
      EVALEX_TRUSTED = false,
      SECRET="vYQ93K...8cww";
</script>

Read the full file on GitHub · 175 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 175 lines · 22 tokens per session scan B 4c7fc78664c8

Subscribe to this mod's changes

flask-werkzeug-attack is a skill published in the GitHub repository uphiago/recon-skills (1,254 stars, last pushed 9d ago), licensed MIT. It adds 22 tokens to every session and 1,896 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (encoded or obfuscated payload, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

python-debugpy

Debug Python with pdb, breakpoint(), post-mortem inspection, and debugpy remote or headless attach.

EKKOLearnAI/hermes-studio · 26 tokens

python-debugpy

Debug Python: pdb REPL + debugpy remote (DAP).

aivrar/portable-hermes-agent · 17 tokens

python-code-quality

Code quality checks, linting, formatting, and type checking commands for the Agent Framework Python codebase. Use this when running checks, fixing lint errors, or troubleshooting CI failures.

microsoft/agent-framework · 40 tokens

plugin-architecture-patterns

Design, implement, or diagnose Xberg plugin traits, typed registries, priority collisions, lifecycle, native extractors, and Alef-generated Python plugin bridges. Load for plugin-system work, not ordinary extractor parsing.

xberg-io/xberg · 49 tokens

test-corpus

The testdocuments submodule is a bucket-fetched fixture corpus that is not committed. This skill covers readtestfixture, missing fixtures, valid A/B controls, and submodule push order. Load before running Rust tests on a fresh clone, setting up an A/B control, adding a fixture-backed test, or diagnosing…

xberg-io/xberg · 72 tokens

pyghidra-scripting

Write and run Python (PyGhidra) code inside the Ghidra session that ReVa's MCP server is already attached to, using the five ReVa scripting tools — run-script, list-scripts, read-script, write-script, edit-script. Use this whenever the user asks to execute Python against the current program, reach for the Ghidra Flat…

cyberkaida/reverse-engineering-assistant · 209 tokens