Skip to content
Info disclosure Write-up Beginner

I made a big mistake…

A Django site was left running with debug mode enabled in production, so an unhandled Unicode encoding error returned a full traceback page. An attacker could read file paths, application configuration, environment variables and the list of defined URL routes from those error pages.

deadoverflow Follow

Published on medium.com

Then just email me asking for the book, and I will gladly send it to you within a short period of time, depends if I’m sleeping…

Imad Husanovic, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the Django DEBUG setting was left as True in the production deployment, so unhandled exceptions rendered verbose diagnostic pages to visitors.

Impact

The exposed pages could reveal file paths, configuration, environment variables and route names, which may help an attacker plan further attacks; the text does not show any of these being used to compromise the site.

What the attacker needed

None

The fix

Debug mode should be turned off in production so a standard error page is shown instead of diagnostic details.

How it was found

  1. Open a blog post on the site and trigger an error from an unencodable character.
  2. Read the debug error page showing version, file paths and settings.
  3. Request a non-existent path to get a 404 page listing the defined routes.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Web frameworks can show a detailed error page when something goes wrong, which is handy while building a site. If that detailed mode is left on for the live site, visitors see internal details such as where files live on the server and how the app is wired up. Here the site owner simply forgot to switch it off.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by deadoverflow

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.