CVE-2026-125012: Flying Images: Optimize and Lazy Load Images for Faster Page Speed <= 2.4.16 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'post_content' Parameter
The Flying Images: Optimize and Lazy Load Images for Faster Page Speed plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'postcontent' parameter in all versions up to, and including, 2.4.16 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. Although wpksespost sanitizes post content on save, the payload is kses-legal at save time; the plugin's output-buffer rewrite transforms it into an executable form at render time by overwriting the valueless data-src attribute with the unescaped src value, meaning save-time sanitization provides no effective mitigation.
Event History
Frequently Asked Questions
Who can exploit this issue?
An attacker needs an authenticated WordPress account with Contributor-level permissions or higher. They must be able to submit content through the post_content parameter.
When does the injected script execute?
The malicious script is stored in an affected page and executes when a user accesses that page. The plugin's output-buffer rewrite changes the saved, kses-legal payload into an executable form during rendering.
Does WordPress post-content sanitization prevent exploitation?
No. Although wp_kses_post sanitizes the content when it is saved, the payload can be valid at save time and becomes executable only after the plugin rewrites data-src into an unescaped src value at render time.
Which plugin versions are affected?
All versions up to and including 2.4.16 are affected.