PHP Info Exposing Secrets at https://radio.mtn.bj/info
A publicly accessible PHP Info page exposed sensitive environment variables, including the Laravel APP_KEY, database credentials, and SMTP credentials. An attacker could use these to send email from an official address and potentially decrypt application data.
- Triaged in 5 days
- Fixed in 7 months
- Disclosed after 15 months
Summary:
During recon I discovered a PHP Info file exposing environment variables such as; Laravel APP_KEY, Database username/password, SMTP username/password, etc.
Steps To Reproduce:
Visit the following URL;
https://radio.mtn.bj/info
You will be presented with a PHP Info file exposing environment / PHP Variables.
Further Information:
I successfully sent an email using python-smtp-mail-sending-tester with the exposed credentials;
$ python smtptest.py -v -u [email protected] -p w?#h#DLkAPa7 [email protected] [email protected] camembert.o2switch.net
('usetls:', False)
('usessl:', False)
('from address:', '[email protected]')
('to address:', '[email protected]')
('server address:', 'camembert.o2switch.net')
('server port:', 25)
('smtp username:', '[email protected]')
smtp password: *****
('smtplib debuglevel:', 0)
-- Message body ---------------------
From: [email protected]
To: [email protected]
Subject: Test Message from smtptest at 2020-12-03 13:02:56
Test message from the smtptest tool sent at 2020-12-03 13:02:56
-------------------------------------
The APP_KEY being exposed can potential be abused as it's primary purpose is for encrypting cookies, creating signatures and encrypting/decrypting values.
Suggestions:
- Never expose PHP Info
- Change all passwords and APP_KEY
Impact
Exposing passwords to critical services. Providing application keys used for encryption/decryption within the app. Sending email coming from an official email address.
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 PHP Info file was left publicly accessible, exposing environment variables that contained sensitive credentials.
Impact
An attacker could send email from an official address and potentially decrypt application data using the exposed APP_KEY.
What the attacker needed
None
The fix
The PHP Info page should be removed or restricted, and all exposed credentials and the APP_KEY should be rotated.
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 Info page is a debugging feature that shows detailed configuration of a PHP server. If left accessible, it can reveal secrets like passwords and encryption keys. Here, anyone could visit the page and see these secrets, then use them to send emails as the company or break encrypted data.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.