All he needed to do is to put this PHP code in any template file and run it:
var_dump(DB_NAME, DB_USER, DB_PASSWORD, DB_HOST);
One line and it will print all the DB credentials.
As you can see – no vulnerabilities are needed.
All PHP code has access to these credentials. And it has to – otherwise it wouldn’t be able to access DB…
Related Posts:
- What’s the database relationship between a post and its attachments
- Upload files – total size limit – WordPress/Contact Form 7
- Importing 10 Years of Media into the WP Database
- Location of image metadata on my server
- Add pdf to a website
- How to fix Uploaded to this post option to see group of images uploaded to a post?
- Media Library doesn’t allow uploads? Upload Directory
- Uploaded images not displaying full size preview or inserting into posts
- Many images in wp-content/uploads folder that are not in Media Library
- Checking if Database Table exists
- Staging sites, how do you manage synchronising updates in the DB?
- How to get the post publish date outside the loop?
- Using transients in conjunction with memcached
- How to define composite keys with dbDelta()
- Has parent field in the table wp_term_taxonomy has term_id or term_taxonomy_id
- Forcing nickname as display_name in custom edit profile template
- Syncing local content with development / staging sites
- Export WP database for import using WP-CLI on Vagrant Box
- What is the advantage of separating wp_users and wp_usermeta table?
- Showing content from another wordpress installation database in the page template loop?
- Multiple WP install with same users database
- Dynamic data in `wp_register_script` needed
- “MySQL server has gone away” since update to 3.8
- WordPress page title repeated in SOME pages
- Updating all rows of table with $wpdb
- What actions affect files, DB, or both?
- Cannot unserialize WordPress serialized values in `wp_options` table?
- Is $wpdb->prepare escaping to much? How to use it properly?
- How to log database changes during an upgrade?
- Using same database for main and subdomain
- What is stored in the webserver? (Separated Database)
- Remove database entries where post_date > expiration date
- Installation with sql server express edition
- Emojis getting converted to “?”
- Building a Scalable Resiliant WP Setup
- Single database for multiple instances
- Get all tags not just first 10 with wp api 2.0
- Should non-WordPress data get its own DB?
- Search and replace special characters (å,ä,ö) for image attachments only in database
- Accidentally deleted active_plugins portion of the wp_options DB table
- Automate dir and DB stack creation with WP-CLI
- delete post meta from db, even if does not exist?
- In what part of the WordPress core does the users table and usermeta table get joined?
- WordPress and MySQL: how to transfer Meta_key and Meta_Value from one post_id to another
- Output custom content not from the posts table?
- Reducing Database Query Time
- How can I get my wordpress password from an SQL file?
- Create table from array with prepare
- Migrate database between 2 different wordpress version
- Is there an atomic way to update_option in WordPress (to ensure data integrity)?
- Form that sends data to an admin panel and can export it
- All text disappeared (seems to be a database problem) [closed]
- Convert user passwords to MD5?
- is wordpress stores Role Id in WP database?
- Why do database examples sometimes finish with an add_option call?
- Upload media only to DB
- How to backup my site and restore my wordpress site
- How and where is wordpress adding mySQL content to database?
- restore a db after bad backup
- How get Data form wordpress database as array not stdclass?
- cannot connect database
- How to delete a particular row in a database table
- Brandoo WordPress Unable to Update to WordPress 4.2.2
- Connecting to wordpress database in my application [closed]
- Is it good practice to import/export a blog to test a redesign?
- change the year on all of my custom post types?
- How do I have a user upload a blog post and then retrieve that to display in a card on the site?
- Delete user with only subscriber role
- WordPress keeps redirecting to localhost
- get value from ‘terms’ table
- custom tables in wordpress Database? (can i just create them with sql?)
- New installation fatal error in 5.9.3 at edit or create entry
- Storing transients giving database error
- How to rename custom table name programatically in wordpress?
- Displaying requested data from a the database in wordpress
- Accidently changed the GUID
- pre_get_posts causings DB error when using ( ‘posts_per_page’, -1)?
- generate PDF from member information
- Is it safe to add INDEX to a column in WordPress database?
- Help posting values to DB on submit using $wpdb->query
- Restore Old Database Over Newer WP & Plugin Files
- wpdb query to insert images in to post/page gallery
- Creating a database in my plugin not working
- How to create index (sql) to a meta_key?
- Not sure what to do next to optimize
- Database structure for thousands of posts
- get_user_meta and umeta_id
- $wpdb not working
- Accessing content from third party as native posts in WordPress
- Extracted CSV as Array for Custom Query Loop
- Hang Up Followed By Can’t select database
- One WP Database outside localhost and two connections
- Send data to database after redirect (and popping out of iframe)
- Fetch data from another site, but the same database
- Simple email input store in database
- Every time I update or install a plugin I get “Error Establishing a Database Connection in WordPress”
- $wpdb->insert not working for last select option
- How to create a table [closed]
- Upload wordpress from localhost to 000webhost
- Query a meta key using an array of values where the database value is a string