Debug output on missing pages

How the scan asks for pages that do not exist and looks for debug pages or stack traces, when it fails, and how to switch debug mode off.

What AuditX checks

The scan sends 4 GET requests to addresses that do not exist on your site, each with a random name that starts with auditx-nx-. Two have one path segment and two have two. It sends up to 4 at a time, waits up to 5 seconds for each, follows up to 3 redirects and tries a failed request once more. It reads up to the first 400,000 characters of each answer and ignores the status code, because a debug page leaks as much on a 404 as on a 500. The check fails when any answer matches the fingerprint of a framework debug or error page. The fingerprints are a Django debug page (it needs the URL patterns text and DEBUG = True), a Laravel Whoops page, an ASP.NET runtime error page, a Rails exception page, a PHP fatal error with a file path, a raw stack trace, a Python traceback, or any text with the words stack trace together with a full file path and a line number. The fingerprints are written to avoid matching an ordinary custom 404 page. The message names the kind of page found. It passes when at least one request completed and none matched. If none completed, the result is an info note that says so. That check is left out of the score, the security score cannot go above 79, and if too many security checks are left out the score is not shown at all. If probes are turned off or the address is not public, the check does not appear. It does not test errors caused by bad input on real pages. A fail lowers the security score. This check never caps the overall score.

Why it matters

OWASP says that detailed internal error messages such as stack traces, database dumps and error codes reveal implementation details that should never be shown to visitors.

The Django documentation says never to enable debug in production, because it leaks a lot of information about the project: excerpts of source code, local variables, settings and the libraries used.

How to fix it

  1. Turn off debug or development mode on the live site. In Django that is DEBUG = False. Other frameworks have a similar setting, often in an environment file.
  2. Show a plain error page for unexpected errors, and write the details to a log file on the server instead of the page.
  3. Check that the setting is really off on the live server, not only on your own computer, then open a made-up address on your site and confirm you see an ordinary error page.
# Django settings for the live site
DEBUG = False

Does your site pass this check? A free scan runs it with every other check and shows the result in about a minute.

Scan my site

Sources

Related checks

Last reviewed 2026-11-13.