Skip to content
Info disclosure Disclosed report Beginner

Unauthenticated phpinfo()files could lead to ability file read at █████████

A publicly reachable PHP file calling phpinfo() was left on the web server, exposing detailed configuration data. An attacker could read server and PHP environment details to plan further attacks.

odaysec Follow

Originally disclosed on HackerOne

  • Fixed in 8 days
  • Disclosed after 38 days

Summary

Many PHP installation tutorials instruct the user to create a PHP file that calls the PHP function 'phpinfo()' for debugging purposes, and various PHP applications may also include such a file by default. By accessing it, a remote attacker can discover a large amount of information about the remote web server configuration to help conduct further attacks, including :

  • root/vps of the web server, operating system and PHP components
  • Details of the PHP configuration
  • Loaded PHP extensions with their configurations
  • Server environment variables.

Proof On Concepts: █████

Linux uggogamesdb 5.4.17-2136.323.8.2.el8uek.x86_64 #2 SMP ████ █████ PDT 2023 x86_64

Steps to Reproduce

  • Visit the target scope is ██████
  • You can used burp-suite-intruder for finding sensitive directory
  • And now we found a directory is info.php
  • Let's see opened in our browser is directory ██████████
  • You can see this page can be view without authenticate

Suggested Mitigation/Remediation Actions

Remove the affected file(s). ███████

The remote web server contains a PHP script that is prone to an information disclosure attack.

The original report as published on HackerOne, by odaysec. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a leftover debugging file calling phpinfo() was deployed to production and not removed.

Impact

An unauthenticated attacker could learn the operating system, PHP configuration, loaded extensions and environment variables, which could help plan further attacks.

What the attacker needed

None

The fix

The affected file(s) should be removed from the server.

How it was found

  1. Visit the target scope.
  2. Use a tool such as Burp Suite Intruder to search for sensitive directories.
  3. Find a directory containing an info.php file.
  4. Open that file in the browser.
  5. Observe the page loads without authentication.

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 report has not been written yet. The Original tab links to the source.

A PHP file that calls phpinfo() prints a long page describing how the server and PHP are set up. That page is meant for debugging and should never be reachable by the public, because it tells an attacker which software versions and settings are in use. Here it was left open with no login required.

What is Info disclosure?

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

More by odaysec

View all

6 more disclosed reports, best first.

More from MTN Group

View all

The newest disclosed reports for this program.

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.