Impact of Using the PHP Function "phpinfo()" on System Security - PHP info page disclosure
A publicly accessible phpinfo() page exposed detailed server and PHP configuration information. An attacker could use this information to research known vulnerabilities and assist in exploiting other issues.
- Triaged in 4 hours
- Fixed in 3 months
- Disclosed after 4 months
Summary:
phpinfo() is a debug functionality that prints out detailed information on both the system and the PHP configuration. This function can reveal sensitive information such as the exact PHP version, operating system and its version, internal IP addresses, server environment variables, and loaded PHP extensions and their configurations. An attacker can use this information to research known vulnerabilities for the system and potentially exploit other vulnerabilities.
Steps To Reproduce:
- Access the address https://rewardsforjustice.net/phpinfo.php
##Remediation Guidance To remediate this issue, you should remove the phpinfo() function from your code, or ensure that it is only accessible to trusted individuals. Additionally, you should ensure that your server environment variables are not accessible to unauthorized users.
Supporting Material/References:
[list any additional material (e.g. screenshots, logs, etc.)]
- "Secure Configuration Guide for PHP" by the National Institute of Standards and Technology (NIST): https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-42.pdf
- "PHP Security Best Practices" by the Open Web Application Security Project (OWASP): https://www.owasp.org/index.php/PHP_Security_Best_Practices
- "PHP Configuration and Hardening" by the SANS Institute: https://www.sans.edu/security-resources/policies/general/docs/php-configuration-hardening
Impact
This information can help an attacker gain more information on the system. After gaining detailed information, the attacker can research known vulnerabilities for that system under review. The attacker can also use this information during the exploitation of other vulnerabilities.
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
Impact
An attacker could gather sensitive system information to research known vulnerabilities and aid in exploiting other vulnerabilities.
What the attacker needed
Phpinfo() page publicly accessible
The fix
The phpinfo() function should be removed from production code or restricted to trusted users only.
How it was found
- Access the phpinfo.php page on the target 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 report has not been written yet. The Original tab links to the source.
phpinfo() is a built-in PHP function that shows a lot of technical details about the server, like the PHP version and installed modules. If this page is publicly accessible, anyone can see this information. Attackers can use it to find out which software versions are running and look for known security holes.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.