{
 "id": "WPSEC-2026-4138",
 "url": "https://wpsec.com/vuln/WPSEC-2026-4138/",
 "json_url": "https://wpsec.com/vuln/WPSEC-2026-4138/advisory.json",
 "markdown_url": "https://wpsec.com/vuln/WPSEC-2026-4138/index.md",
 "osv_url": "https://wpsec.com/vuln/osv/WPSEC-2026-4138.json",
 "title": "Enable Media Replace <= 4.2.3 - Authenticated (Author+) PHP Object Injection via Media Replacement Link Update",
 "description": "The Enable Media Replace plugin for WordPress is vulnerable to PHP Object Injection via the database link update that runs after a media file is replaced in all versions from 3.5.0 up to, and including, 4.2.3. This is due to the replacer removing one layer of serialization from matching meta and option values without adding it back: a string that WordPress stored serialized (for example a custom field whose text is itself a serialized object) was written back to the database as the raw inner string with a direct SQL UPDATE. WordPress later unserializes that value with no class restrictions when it is read. This makes it possible for authenticated attackers with Author-level access and above to inject a PHP object by adding such a custom field to their own post and then replacing a media file whose URL the field contains. No known POP chain is present in the plugin itself. If a POP chain is present through another plugin or theme installed on the target system, it could allow the attacker to delete arbitrary files, retrieve sensitive data, or execute code.",
 "plugin": {
  "slug": "enable-media-replace",
  "name": "Enable Media Replace",
  "full_name": "Enable Media Replace",
  "wordpress_org": "https://wordpress.org/plugins/enable-media-replace/",
  "advisories_url": "https://wpsec.com/vuln/plugin/enable-media-replace/",
  "attacksurface": "https://attacksurface.wpsec.com/plugin/enable-media-replace"
 },
 "type": "OBJECT INJECTION",
 "cwe": [
  "CWE-502"
 ],
 "cve": [],
 "cvss": {
  "version": "3.1",
  "score": 7.5,
  "vector": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
  "severity": "High"
 },
 "affected": {
  "ranges": [
   {
    "from": "3.5.0",
    "from_inclusive": true,
    "to": "5.0.0",
    "to_inclusive": false
   }
  ],
  "text": [
   "from 3.5.0 before 5.0.0"
  ]
 },
 "introduced_in": "3.5.0",
 "fixed_in": "5.0.0",
 "remediation": "Update to 5.0.0 or later.",
 "fix_released": "2026-11-26T17:12:52+00:00",
 "published": "2026-11-27T17:43:35+00:00",
 "updated": "2026-11-27T10:20:47.717149+00:00",
 "also_published_as": null,
 "references": [
  "https://wpsec.com/vuln/WPSEC-2026-4138/",
  "https://plugins.svn.wordpress.org/enable-media-replace/tags/5.0.0/",
  "https://wordpress.org/plugins/enable-media-replace/"
 ],
 "attacksurface_url": "https://attacksurface.wpsec.com/plugin/enable-media-replace",
 "source": "WPSec",
 "license": {
  "name": "CC BY 4.0",
  "url": "https://creativecommons.org/licenses/by/4.0/"
 },
 "usage": {
  "plugin": "Medium",
  "affected_versions": "Medium",
  "as_of": "2026-11-27"
 }
}