c2fo.com is releasing sensitive Information about Database Configuration.
The WordPress configuration file wp-config.php was publicly downloadable, exposing database credentials.
Originally disclosed on HackerOne
- Triaged in 3 hours
- Fixed in 6 hours
- Disclosed after 30 days
Hello C2FO Securiity Team,
Vulnerability Details : Disclosure of Database Username and Password of c2fo.com
Description: Your configuration file of your website is available to download from your website c2fo.com.When i thought to pentest your site,i landed on https://c2fo.com .But instead of showing the website it showed 403 Forbidden error.It seemed weird to me ,then i went to the link https://c2fo.com/wp-config.php and the file downloaded to my computer.Then i tried to download .htaccess and wp-login.php and yes they were also available to download.
POC:
I have made proof of concept video of the same :- https://www.youtube.com/watch?v=AXq-YWO_EhI The above video is unlisted .
Below is some lines from wp-config.php
Database Configuration
define('DB_NAME','wp_c2fo'); define('DB_USER','c2fo'); define('DB_PASSWORD','*********'); define('DB_HOST','127.0.0.1'); define('DB_HOST_SLAVE','127.0.0.1'); define('DB_CHARSET', 'utf8'); define('DB_COLLATE', 'utf8_unicode_ci'); $table_prefix = 'wp_';
I have included all the files i have downloaded ,in the attachment .
Remedy:- Please change your configuration file as soon as possible because might be some attacker have also downloaded the file and use it for future attack's on c2fo.com
With regard's
Aditya Agrawal
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 the web server was misconfigured to serve PHP source files as plain text instead of executing them, allowing direct download of wp-config.php.
Impact
An attacker could obtain database credentials and potentially access or modify the database, though the text does not confirm actual exploitation.
What the attacker needed
None
The fix
The configuration file should be changed as soon as possible.
How it was found
- Visit the main site and observe a 403 Forbidden error.
- Navigate directly to the wp-config.php file and download it.
- Also download .htaccess and wp-login.php files.
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 settings file containing the database username and password could be downloaded by anyone, exposing those secrets.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.