Skip to main content
MediumInfo disclosureOWASP A05:2021CWE-209

How to fix: Phoenix (Elixir) Debug Error Page Exposed

A Phoenix framework debug error page, identifiable by an Elixir error marker alongside a '_web/controllers' or '_web/router.ex' module path, was found in the response.

Why it matters

The page discloses application module names, file paths, and the request pipeline's internal state at the point of failure.

Phoenix's debug error pages (enabled via 'debug_errors: true' in config/dev.exs) render detailed diagnostic information. This configuration should never be active for a production release.

How to fix it

  1. 1Ensure config/prod.exs sets debug_errors: false (the Phoenix generator default).
  2. 2Confirm MIX_ENV=prod is set for the deployed release.
  3. 3Add a generic error view for production so unhandled exceptions render a plain error page.

Code examples

config/prod.exs

ELIXIR
config :my_app, MyAppWeb.Endpoint,
  debug_errors: false,
  code_reloader: false,
  check_origin: true

References

Detected automatically by VulnRadar. The check id is phoenix-debug-error-exposed, stable across every scan so you can filter or diff on it.

See every info disclosure check

Questions

How severe is Phoenix (Elixir) Debug Error Page Exposed?
VulnRadar rates this medium severity in the info disclosure category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id phoenix-debug-error-exposed, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does Phoenix (Elixir) Debug Error Page Exposed map to?
It maps to CWE-209. In the OWASP Top 10 it falls under A05:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for phoenix (elixir) debug error page exposed

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

Phoenix (Elixir) Debug Error Page Exposed fix | VulnRadar