# Debug Mode Enabled in Production

> Detects debug mode enabled in production configurations, exposing stack traces, internal paths, and sensitive configuration details.

- Skill: `zakirkun/debug-mode-enabled-in-production` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zakirkun/debug-mode-enabled-in-production`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zakirkun/debug-mode-enabled-in-production/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: zakirkun (https://skillmd.com/u/zakirkun)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zakirkun/debug-mode-enabled-in-production

---


# Debug Mode Enabled in Production

## Overview
Debug mode in web frameworks exposes critical information to attackers:
- **Flask DEBUG=True**: Interactive debugger in browser, allows arbitrary code execution
- **Django DEBUG=True**: Full stack traces with local variable values shown to users
- **Node.js** with verbose error logging: Internal file paths, stack traces
- **Spring Boot actuator**: `/actuator/env`, `/actuator/heapdump` exposed

## Remediation
- Set `DEBUG=False` in all production configurations
- Use environment variables to control debug settings
- Implement a custom error handler that returns generic error messages
- Disable development-only actuator endpoints in production

**Vulnerable (Flask):**
```python
app.run(debug=True, host='0.0.0.0')  # Never in production!
```

