CVE-2026-6295: WP Optimizer <= 2.5.0 - Authenticated (Administrator+) SQL Injection via 's' Parameter

Published Sep 19, 2026
·
Updated

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::parsekeycomparefield() 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 escsql($wpdb->esclike(...)) and wraps the value in single quotes, this branch completely bypasses those protections. Because the attack payload (SELECT ...) contains no single quotes, WordPress's wpmagicquotes() 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.

Affected Software

1 affected component
WP Optimizer WordPress plugin<=2.5.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade WP Optimizer plugin for WordPress to a version that resolves this vulnerability.

    Fixed in 2.5.0
  2. Compensating control

    Because exploitation requires authenticated attackers with administrator-level access, restrict administrator access to WordPress (limit who can log in with administrator privileges) to reduce the likelihood of SQL injection abuse via the WP Optimizer 's' parameter.

Event History

Sep 19, 2026
CVE Published
via MITRE·07:43 AM
Data Sourced
via MITRE·07:43 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What level of access does an attacker need?

Exploitation requires an authenticated WordPress account with administrator-level privileges. No user interaction is required.

2

Why does the usual escaping path not prevent this issue?

Values beginning with a SELECT subquery pattern are handled by a separate branch that inserts them directly into the SQL query without escaping or quoting. Payloads containing no single quotes also are not protected by WordPress wp_magic_quotes().

3

What could an attacker obtain through exploitation?

An administrator-level attacker can inject arbitrary SQL subqueries, including time-based blind queries. This can be used to extract sensitive information from the WordPress database.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203