Skip to content
Info disclosure Write-up Beginner

Stack Trace Exposure via Malformed Authorization Header

A malformed Authorization header caused an unhandled exception, and the server returned a full Java stack trace in the HTTP 500 response body. The trace disclosed the web server, framework, operating system, internal package structure, authentication handler class and line numbers, and session manager implementation, which an attacker could use for reconnaissance.

dev_fr_ Follow

Published on medium.com

While testing a subdomain belonging to a major tech company, I found that sending a malformed Authorization header triggers an unhandled exception — and the server responds with a full Java stack trace exposed in the HTTP 500 response body.

Hamza, 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 application did not validate the Authorization header format before passing it to the authentication handler, and error handling in production returned the raw exception instead of a generic message.

Impact

An attacker could learn the exact framework, version and operating system plus internal class and package names, reducing effort when searching for known vulnerabilities and crafting targeted attacks; the text notes this is not a direct compromise.

What the attacker needed

Ability to send HTTP requests to the host; no authentication needed

The fix

The report recommends returning a generic error message, logging exceptions server-side only, validating the Authorization header before it reaches the authentication handler, stripping server version headers and disabling debug mode in production.

How it was found

  1. Send a request to the target host with a malformed Authorization header.
  2. Observe the HTTP 500 response containing a full Java stack trace.

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.

When a program crashes, it can print a detailed error report called a stack trace that shows exactly which code failed and where. Here the server sent that internal report back to whoever made the request, instead of a simple error message. That hands an outsider a map of the software and its versions, which helps them look for known weaknesses.

What is Info disclosure?

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

More by dev_fr_

View all

5 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.