Skip to content
Info disclosure Write-up Beginner

Information Disclosure

The write-up covers five PortSwigger labs where verbose error messages, a debug page, backup files, a custom header, and exposed version control history leak sensitive information. An attacker could use these leaks to obtain framework versions, secret keys, database credentials, an authentication bypass header, and an administrator password.

medium.com

Published on medium.com

This lab’s verbose error messages reveal that it is using a vulnerable version of a third-party framework. To solve the lab, obtain and submit the version number of this framework.

Usama Hanif, 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 exposes internal details through verbose errors, debug pages, backup files, custom headers, and a publicly reachable version control directory.

Impact

An attacker could obtain framework versions, secret keys, database credentials, an authentication bypass header, and an administrator password, potentially leading to full compromise of the application.

What the attacker needed

None

The fix

The application should avoid exposing verbose errors, debug pages, backup files, custom headers, and version control directories to untrusted users.

How it was found

  1. Change the productId parameter to an invalid value to trigger a verbose error message.
  2. Check the page source for a comment that reveals the path of a PHP file, then access that file.
  3. Run a scanner to find robots.txt, which lists a backup folder containing sensitive files.
  4. Run gobuster to find hidden directories, then access the admin endpoint and observe it is restricted to local users.
  5. Scan the site to find a custom header, then add that header with a localhost IP to bypass authentication.
  6. Run dirb to find a .git directory, download it recursively, and inspect the commit history for removed secrets.

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.

These labs show how websites can accidentally reveal private details, such as error messages that name software versions or files that should not be public. Someone who finds these details can use them to break in or learn secrets. The write-up walks through each lab and shows the tool or request used to find the leak.

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.