Skip to content
Info disclosure Write-up Beginner

The phpinfo() Page That Shouldn’t Have Been There — And

A publicly reachable info.php file on a live subdomain returned full phpinfo() output, exposing the PHP version, operating system and kernel details, loaded modules, internal file paths and an admin contact. An attacker could use this blueprint to fingerprint the stack and plan follow-on attacks such as known PHP exploits or file-inclusion attempts.

Anshubind Follow

Published on medium.com

There’s a specific kind of vulnerability that feels almost nostalgic. Something from the early days of PHP.

Anshubind, 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 debug file was deployed to a live environment and left publicly reachable, with no access restriction.

Impact

The exposed page revealed an end-of-life PHP version, OS and kernel details, an internal hostname, loaded modules, internal file paths and an admin contact, which could help an attacker search for known exploits and plan file-inclusion or other targeted attacks; the text does not claim any exploitation actually occurred.

What the attacker needed

Publicly reachable subdomain; no authentication required

The fix

The page should be removed from production, access to any debugging page restricted by firewall, VPN or IP allowlist, PHP upgraded to a supported version, environment values sanitised and pipelines changed so debug files are never deployed.

How it was found

  1. Notice a subdomain whose name suggests a staging or development environment.
  2. Request the info.php path on that subdomain.
  3. Observe the full phpinfo() output returned by the live server.

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 built-in PHP diagnostic screen that lists how the server is set up: software versions, file locations and loaded add-ons. It is meant for developers on their own machine, but here it was left on a public server, so anyone on the internet could read it. On its own it does not let anyone break in, but it hands attackers a map of the system to plan a real attack.

What is Info disclosure?

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

More by Anshubind

View all

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