{"schemaVersion":3,"id":"CVE-2026-5217","aliases":[],"status":"published","duplicateOf":null,"title":null,"description":"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.","dates":{"published":"2026-04-11T01:24:58.602Z","modified":"2026-04-13T15:15:08.543Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.2,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":7.2,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.2,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"wordfence","score":7.2,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00419,"percentile":0.3504,"severity":"low","asOf":"2026-10-21T00:00:00.000Z","change":{"pp":-0.019000000000000006,"baselineDate":"2026-09-21T00:00:00.000Z","baselineScore":0.00438},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00438,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00438,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00438,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00438,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00438,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00438,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00438,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00438,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00438,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00438,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00419,"percentile":0.3504}],"last30":[{"date":"2026-09-21T00:00:00.000Z","score":0.00438,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00438,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00438,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00419,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00419,"percentile":0.3504}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","description":"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.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/79.html"}],"affected":[{"vendor":"optimole","product":"optimole – optimize images in real time","name":"Optimole – Optimize Images in Real Time","label":"optimole – optimize images in real time","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 4.2.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 4.2.2","eol":null,"hubHref":"/vendor/optimole/optimole_-_optimize_images_in_real_time"},{"vendor":"wordpress","product":"optimole-wp","name":"Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization","label":"optimole-wp","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 4.2.2 (fixed in 4.2.3)","noFixRecorded":false,"fixedIn":"4.2.3"}],"versionsText":"≤ 4.2.2 (fixed in 4.2.3)","eol":null,"hubHref":null}],"affectedCount":2,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://www.wordfence.com/threat-intel/vulnerabilities/id/50417068-339a-4ae5-9c90-8f08f54ce0af?source=cve","label":"www.wordfence.com/threat-intel/vulnerabilities/id/50417068-339a-4ae5-9c90-8f08f54ce0af?source=cve","hostname":"www.wordfence.com","tags":[]},{"url":"https://plugins.trac.wordpress.org/browser/optimole-wp/trunk/inc/rest.php#L159","label":"plugins.trac.wordpress.org/browser/optimole-wp/trunk/inc/rest.php","hostname":"plugins.trac.wordpress.org","tags":[]},{"url":"https://plugins.trac.wordpress.org/browser/optimole-wp/trunk/inc/rest.php#L1008","label":"plugins.trac.wordpress.org/browser/optimole-wp/trunk/inc/rest.php","hostname":"plugins.trac.wordpress.org","tags":[]},{"url":"https://plugins.trac.wordpress.org/browser/optimole-wp/trunk/inc/tag_replacer.php#L526","label":"plugins.trac.wordpress.org/browser/optimole-wp/trunk/inc/tag_replacer.php","hostname":"plugins.trac.wordpress.org","tags":[]},{"url":"https://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.1/inc/tag_replacer.php#L526","label":"plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.1/inc/tag_replacer.php","hostname":"plugins.trac.wordpress.org","tags":[]},{"url":"https://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.1/inc/rest.php#L1008","label":"plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.1/inc/rest.php","hostname":"plugins.trac.wordpress.org","tags":[]},{"url":"https://plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.1/inc/rest.php#L159","label":"plugins.trac.wordpress.org/browser/optimole-wp/tags/4.2.1/inc/rest.php","hostname":"plugins.trac.wordpress.org","tags":[]},{"url":"https://www.wordfence.com/threat-intel/vulnerabilities/id/50417068-339a-4ae5-9c90-8f08f54ce0af","label":"www.wordfence.com/threat-intel/vulnerabilities/id/50417068-339a-4ae5-9c90-8f08f54ce0af","hostname":"www.wordfence.com","tags":["Vendor Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-04-11T01:24:58.602Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-04-13T15:15:08.543Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":29,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T21:15:01.409Z","stale":false,"partial":false}}