CVE-2026-6295
Received Received - Intake

SQL Injection in WP Optimizer WordPress Plugin

Vulnerability report for CVE-2026-6295, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-19

Last updated on: 2026-09-19

Assigner: Wordfence

Description

The WP Optimizer plugin for WordPress is vulnerable to SQL Injection via the 's' parameter in all versions up to and including 2.5.0. This is due to an unsafe subquery-detection branch in the Query::parse_key_compare_field() method that, when the user-supplied value matches the regex ^[(\s]*SELECT\s+, wraps the value in parentheses and embeds it directly into the SQL string without any escaping or quoting. While the normal LIKE code path correctly uses esc_sql($wpdb->esc_like(...)) and wraps the value in single quotes, this branch completely bypasses those protections. Because the attack payload (SELECT ...) contains no single quotes, WordPress's wp_magic_quotes() provides no protection. This makes it possible for authenticated attackers with administrator-level access to inject arbitrary SQL subqueries β€” including time-based blind payloads β€” that can be used to extract sensitive information from the database.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-19
Last Modified
2026-09-19
Generated
2026-09-20
AI Q&A
2026-09-20
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
wp_optimizer wp_optimizer to 2.5.0 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-89 The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a SQL Injection vulnerability in the WP Optimizer WordPress plugin up to version 2.5.0. It occurs when the 's' parameter is used in a way that bypasses security checks. The plugin fails to properly escape user input when it matches a specific pattern, allowing attackers to inject malicious SQL queries directly into the database.

Detection Guidance

This vulnerability can be detected by checking if the WP Optimizer plugin version 2.5.0 or below is installed. Inspect WordPress plugin files for suspicious SQL patterns in the 's' parameter handling. Look for admin-level access attempts with payloads matching SELECT queries.

Impact Analysis

An attacker with administrator access could exploit this to extract sensitive data from your WordPress database, such as user credentials, personal information, or other confidential data. They could also perform time-based blind attacks to further compromise your site.

Compliance Impact

This vulnerability could lead to unauthorized access and exposure of personal data, violating GDPR and HIPAA requirements for data protection and security. Organizations may face legal penalties, fines, or reputational damage if such breaches occur due to unpatched vulnerabilities.

Mitigation Strategies

Immediately update the WP Optimizer plugin to the latest version. If an update is unavailable, disable the plugin until a patch is released. Restrict administrator-level access to trusted users only.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-6295. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart