# Enable Media Replace <= 4.2.2 - Authenticated (Author+) PHP Object Injection via Database Replacement

- **ID:** WPSEC-2026-1780
- **Plugin:** Enable Media Replace (`enable-media-replace`), https://wordpress.org/plugins/enable-media-replace/
- **Affected versions:** all versions before 4.2.3
- **Fixed in:** 4.2.3 (Update to 4.2.3 or later.)
- **Severity:** High 7.5 (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H)
- **Weakness:** CWE-502
- **Usage among sites WPSec scans:** plugin Medium, affected versions Medium (as of 2026-10-27)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/enable-media-replace
- **Fix released:** 2026-10-26
- **Published:** 2026-10-27
- **URL:** https://wpsec.com/vuln/WPSEC-2026-1780/

## Description

The Enable Media Replace plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 4.2.2 via the database search and replace performed after a media replacement, due to unsafe handling of serialized data. This makes it possible for authenticated attackers, with Author-level access and above, to inject a PHP object under certain conditions. No known POP chain is present in the vulnerable software itself; if a POP chain is present via an additional plugin or theme installed on the target system, it may allow the attacker to delete arbitrary files, retrieve sensitive data, or execute code.

## References

- https://wpsec.com/vuln/WPSEC-2026-1780/
- https://plugins.svn.wordpress.org/enable-media-replace/tags/4.2.3/
- https://wordpress.org/plugins/enable-media-replace/

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

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.
