Skip to content
Info disclosure Write-up Beginner

From a Simple Stack Trace to Accessing an SAP Portal.

A Django application running with debug mode enabled returned verbose stack traces that disclosed internal file paths, configuration values and a set of SAP CRM credentials. The author used those credentials to log in to an internet-facing SAP portal, although authorisation controls limited what the account could reach.

medium.com

Published on medium.com

I was testing error handling on the application. nothing fancy, just trying to see how the system behaved when fed unexpected input. Eventually, one of those inputs triggered something interesting:

Gaurang Jethva, 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 enabled in production, so verbose error pages and internal paths exposed configuration data including SAP credentials.

Impact

An attacker could read internal configuration and SAP credentials and authenticate to a live internet-facing SAP environment, though authorisation controls stopped access to administrative modules.

What the attacker needed

Django debug mode enabled in production; SAP portal reachable from the internet; No authentication needed to trigger errors

The fix

The application should be run with Django debug mode disabled in production, returning generic error pages and keeping secrets out of error output.

How it was found

  1. Send unexpected input to the application to trigger an error.
  2. Observe a full stack trace with internal file paths and framework details.
  3. Append an internal file path from the trace to the domain and receive internal metadata and configuration.
  4. Notice an SAP CRM reference and exposed username and password in the response.
  5. Enumerate likely SAP portal endpoints on the same domain and find the login page.
  6. Log in to the SAP portal with the exposed credentials.

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.

A web framework can be set to a 'debug' mode that shows detailed error pages while developers are building a site. If that mode is left on in production, anyone who triggers an error can see internal file paths, settings and sometimes passwords. Here the leaked details included a username and password for a separate SAP business system, and the tester could log in with them.

What is Info disclosure?

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

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.