Able to download arbitrary PHP files at yelpblog.com
A WordPress installation on yelpblog.com served PHP source files from the wp-includes directory as downloads instead of executing them. An attacker could download these files to read sensitive server information and perform source code analysis.
- Triaged in 7 days
- Fixed in 9 days
- Paid in 9 days
- Disclosed after 40 days
There is a misconfigured wordpress installation at yelpblog.com, through which i am able to download any php files in wp-includes folder.
For a PoC, you can open https://www.yelpblog.com/wp-includes/wp-db.php, and the wp-db.php will be download(along with all the data in it)
As we all know that these PHP files can sensative information of a website, and the wp-includes folder is the base of a WordPress installation, Being able to download php files is a clearly wrong behaviour of a wordpress installation. The PHP files in wp-includes can have a lot of sensative information about the server, which may help a attacker in compromising the server. He can even do a source code analysis if he is able to download arbitrary PHP files.
Attachments

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 files as static downloads rather than passing them to the PHP interpreter.
Impact
An attacker could read sensitive information from the PHP files, which may help compromise the server, and could perform source code analysis.
What the attacker needed
None
The fix
The server should be configured so PHP files in wp-includes are not served as downloadable source.
How it was found
- Open the URL for a PHP file inside the wp-includes folder.
- Observe that the PHP file is downloaded instead of executed.
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.
Web servers normally run PHP files and send only the output. Here the server sent the raw PHP file, so anyone could read the code inside it. That code can contain sensitive information about the server.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.