CVE-2026-5226
Received Received - Intake
Reflected XSS in Optimole WordPress Plugin Allows Script Injection

Publication date: 2026-04-11

Last updated on: 2026-04-11

Assigner: Wordfence

Description
The Optimole – Optimize Images in Real Time plugin for WordPress is vulnerable to Reflected Cross-Site Scripting via URL paths in versions up to, and including, 4.2.3 This is due to insufficient output escaping on user-supplied URL paths in the get_current_url() function, which are inserted into JavaScript code via str_replace() without proper JavaScript context escaping in the replace_content() function. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that execute if they can successfully trick a user into performing an action such as clicking on a link.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-11
Last Modified
2026-04-11
Generated
2026-05-07
AI Q&A
2026-04-11
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
optimole optimize_images_in_real_time to 4.2.3 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

The vulnerability exists in the Optimole – Optimize Images in Real Time plugin for WordPress, specifically in versions up to and including 4.2.3. It is a Reflected Cross-Site Scripting (XSS) issue caused by insufficient output escaping of user-supplied URL paths. These URL paths are processed in the get_current_url() function and inserted into JavaScript code via str_replace() without proper escaping for JavaScript context in the replace_content() function. This allows unauthenticated attackers to inject arbitrary web scripts that execute if a user is tricked into clicking a malicious link.


How can this vulnerability impact me? :

This vulnerability can allow attackers to execute arbitrary JavaScript in the context of the affected website. This can lead to actions such as stealing user session cookies, redirecting users to malicious sites, or performing actions on behalf of the user without their consent. Since the attack requires tricking a user into clicking a crafted link, it can be used for phishing or other social engineering attacks.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart