# WP-Optimize <= 4.7.1 - Authenticated (Editor+) Arbitrary File Read via Minify Script Module URL

- **ID:** WPSEC-2026-4610
- **Plugin:** WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance (`wp-optimize`), https://wordpress.org/plugins/wp-optimize/
- **Affected versions:** all versions before 4.7.2
- **Fixed in:** 4.7.2 (Update to 4.7.2 or later.)
- **Severity:** Medium 4.9 (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N)
- **Weakness:** CWE-22
- **Usage among sites WPSec scans:** plugin Medium, affected versions Medium (as of 2026-12-04)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/wp-optimize
- **Fix released:** 2026-12-03
- **Published:** 2026-12-04
- **URL:** https://wpsec.com/vuln/WPSEC-2026-4610/

## Description

The WP-Optimize plugin for WordPress is vulnerable to Arbitrary File Read in all versions up to, and including, 4.7.1 due to missing path containment and file extension validation when the Minify feature resolves asset URLs from page script tags to local files, and because the bundled minifier libraries could import local files. This makes it possible for authenticated attackers with Editor-level access and above to read the contents of arbitrary server files, including sensitive files such as wp-config.php, by publishing a post containing a crafted script module URL (which reads only files without PHP code) or, for files such as wp-config.php, inline style/script blocks that the bundled minifiers resolve. Exploitation requires the Minify feature to be enabled.

## References

- https://wpsec.com/vuln/WPSEC-2026-4610/
- https://plugins.svn.wordpress.org/wp-optimize/tags/4.7.2/
- https://wordpress.org/plugins/wp-optimize/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-4610/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
