Skip to content

Optimole – Optimize Images in Real Time

Optimole <= 4.2.2 - Unauthenticated Stored Cross-Site Scripting via Srcset Descriptor Parameter

CVE-2026-5217Published 11 Apr 2026, 01:24 UTC

Real-world risk

2.6/ 10Low

Routine

PreliminaryFrom the CVSS vector only · confidence low

CVSS

7.2

scored by the vendor (CNA), CVSS 3.1

In plain words

No plain-language summary yet. The original description is below.

Original description (from Wordfence)

The Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization plugin for WordPress is vulnerable to Stored Cross-Site Scripting in all versions up to, and including, 4.2.2. This is due to insufficient input sanitization and output escaping on the user-supplied 's' parameter (srcset descriptor) in the unauthenticated /wp-json/optimole/v1/optimizations REST endpoint. The endpoint validates requests using an HMAC signature and timestamp, but these values are exposed directly in the frontend HTML making them accessible to any visitor. The plugin uses sanitize_text_field() on the descriptor value of rest.php, which strips HTML tags but does not escape double quotes. The poisoned descriptor is then stored via transients (backed by the WordPress options table) and later retrieved and injected verbatim into the srcset attribute of tag_replacer.php without proper escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts into pages that will execute whenever a user accesses the injected page.

Am I affected?

ProductAffected versions (from the sources)Fixed in
Optimole – Optimize Images in Real TimeNiche<= 4.2.2—

What to do

Check the vendor advisory in the references below for fixed versions and workarounds.

Why this score

FactorValueEvidence×
ImpactMinorReflected XSS, CSRF with low effect, open redirect, minor leakFrom the CVSS vector0.30
Attacker positionInternetAnyone on the Internet can reach a typical deploymentFrom the CVSS vector1.00
Privileges neededNoneNo accountFrom the CVSS vector1.00
Victim interactionNoneNothingFrom the CVSS vector1.00
ConfigurationDefaultOut-of-the-box installs are vulnerableFrom the CVSS vector1.00
ReliabilityReliableDeterministic: injection, logic bug, path traversalFrom the CVSS vector1.00

Threat level T1: Nothing known (× 0.85)

The default for a new disclosure

EPSS 0.5% chance of exploitation in 30 days (percentile 42), as of 2026-12-02.

The arithmetic
  1. Prerequisites multiplied together1.000
  2. Threat T1: Nothing known0.850
  3. 10 × impact 0.3 × prerequisites 1 × threat 0.852.550
  4. Rounded to one decimal between 0.1 and 102.6

How the score works

Exploitation and evidence timeline

  1. 11 Apr 2026 Published
  2. 3 Dec 2026 Risk 2.6 (cvss fallback)

Weakness

CWE-79

References

Get alerts for Optimole – Optimize Images in Real Time

Free email or text alerts when a vulnerability in Optimole – Optimize Images in Real Time reaches risk 8 or higher. Nothing else.