Skip to content
Info disclosure Write-up Beginner

Sensitive Server Info Disclosure via Public phpinfo()

A production server exposed a phpinfo() page that revealed sensitive server details such as PHP version, file paths, and environment variables. An attacker could use this information to tailor further attacks, especially if combined with other vulnerabilities like local file inclusion.

medium.com

Published on medium.com

While performing recon across multiple public assets tied to a known electronics company, I identified a domain with a /test/ directory exposed.

Md Nawshad Ahmmed, 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 a leftover debug or test script was accidentally deployed to production without access controls.

Impact

The exposed information could help attackers craft targeted exploits, especially if combined with other vulnerabilities like LFI or file upload bugs.

What the attacker needed

None

The fix

The page should be removed from production, and automated scanning plus access controls should be used to prevent similar exposures.

How it was found

  1. Perform reconnaissance on public assets of the target company.
  2. Identify a domain with a /test/ directory exposed.
  3. Use directory brute-forcing and manual inspection to find the phpinfo.php endpoint.
  4. Access the endpoint to view the full phpinfo() output.

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 phpinfo() page is a diagnostic tool that shows details about the server's software and configuration. If left publicly accessible, it can give attackers a map of the system, making it easier to find and exploit other weaknesses.

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.