How I Found 40 Websites Source Code Disclosure Via Exposed Wordpress Folders Wp Admin Using
Several WordPress sites had directory listing enabled on folders such as wp-admin and wp-content/uploads, so anyone could browse and read files that should not be public. In some cases configuration files with database credentials and authentication keys were exposed to anyone who found the folders.
Published on infosecwriteups.com
I have found more than 40+ Directory Listing Vulnerabilities which contain Source Code Disclosure via the Exposed WordPress Folders (/wp-admin & Others) just by using Google Dorks as shown below 👇
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the web server had directory listing enabled and no access restrictions on sensitive WordPress folders, so files inside them could be listed and downloaded.
What the attacker needed
Internet access; a search engine
The fix
The folders should be removed from the web root or public access to them should be denied, and sensitive directories should have proper permissions.
How it was found
- Search Google with a dork that looks for pages titled as a directory index of the WordPress admin folder.
- Open the results and check whether the server lists the folder contents.
- Repeat the search for the uploads folder to find other exposed directories.
- Inspect the listed files for configuration data such as database credentials and authentication keys.
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 write-up has not been written yet. The Original tab links to the source.
A web server can be set to show a list of every file in a folder, like opening a drawer and seeing everything inside instead of just the one document you asked for. If that folder holds private files such as configuration files, a stranger can read them. Here the author used Google searches to find WordPress sites whose folders were set up this way.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.