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

Medium 4.9 Published Updated

Authenticated administrators can inject SQL via the 's' parameter to extract sensitive database information in WP Optimizer.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-6295?

CVE-2026-6295 is a medium-severity SQL injection vulnerability in sh1zen WP Optimizer – PageSpeed, Cache, Minify & Core Web Vitals, published on 19 Sep 2026. An attacker needs administrator access to exploit it, with no action from the victim.

Official 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.

Weakness: CWE-89

Which versions are affected by CVE-2026-6295?

How do I fix CVE-2026-6295?

No fix has been published for CVE-2026-6295 yet. Limit exposure of the affected software until one is available.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2026-6295 being exploited?

There is no known exploitation of CVE-2026-6295 in the wild and no public exploit code.

Sources

Also known as GHSA-cv43-j772-67wp.

Is CVE-2026-6295 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free