Exploiting Sql Injection In Wp Fastest Cache Cve 2023 6063
An unauthenticated SQL injection vulnerability existed in the WP Fastest Cache WordPress plugin, specifically in the is_user_admin function, where the wordpress_logged_in cookie was not properly sanitised. An attacker could exploit this to manipulate SQL queries and potentially access sensitive database information.
Published on infosecwriteups.com
In the ever-changing digital landscape, safeguarding the security of our online assets is of utmost importance. WordPress, a major player in web development, recently faced a significant security challenge with a critical vulnerability in one of its widely-used plugins — WP Fastest Cache.
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
The plugin failed to sanitise the username value taken from the wordpress_logged_in cookie before using it in an SQL query.
Impact
An attacker could manipulate the SQL query to potentially gain access to sensitive information stored in the website’s database.
What the attacker needed
WP Fastest Cache plugin enabled; No authentication required
The fix
The vulnerability was fixed in version 1.2.2 by applying esc_sql() to the $username variable, though the added $wpdb->prepare() call is ineffective.
How it was found
- Enable the WP Fastest Cache plugin in its settings.
- Send a request to the WordPress login page with a crafted wordpress_logged_in cookie.
- Use an SQL injection tool to exploit the cookie parameter and retrieve database information.
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.
SQL injection is when a program puts user input directly into a database command without checking it, so an attacker can sneak in extra commands. Here, the plugin read a cookie value and used it in a database query without cleaning it, so a malicious cookie could change what the database does. This could let an attacker read private data from the site's database.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.