Skip to content
SQL injection Write-up Intermediate

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.

Sandeep Vishwakarma Follow

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.

Sandeep Vishwakarma, on infosecwriteups.com

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

  1. Enable the WP Fastest Cache plugin in its settings.
  2. Send a request to the WordPress login page with a crafted wordpress_logged_in cookie.
  3. 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.

More by Sandeep Vishwakarma

View all

5 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.