Skip to main content
All rules

SEC-030

Symfony profiler is public

HighDefault severity · Security · Secrets, HTTPS and security headers

Last reviewed

What it checks

/_profiler/ and /app_dev.php.

Why it matters

The profiler shows every recent request with headers, session data and database queries, and the dev front controller runs the app in debug mode.

Recommended fix

Deploy with APP_ENV=prod and remove the dev front controller.

How to verify

Request each listed path on the live site and confirm it returns 404 or 403.

Example fix prompt

Generic prompt (your report adds the evidence)
Please fix this production issue in my app.

Issue SEC-030: Symfony profiler is public
Site: https://your-app.example

First confirm the issue in the code or live config. If it is not present, say so and change nothing.
Task: Deploy the Symfony app with APP_ENV=prod and APP_DEBUG=0, remove WebProfilerBundle from production, and delete public/app_dev.php if it exists.

Constraints: make the smallest change that fixes this, keep the current design and behaviour, never paste secret values into code or chat, and tell me which files you changed.
Done when: Request each listed path on the live site and confirm it returns 404 or 403.

References