CVE-2026-71232 in MacCMS10info

Summary

by MITRE • 08/05/2026

MacCMS10's admin template editor (application/admin/controller/Template.php) blocks dangerous PHP functions in template content via a blacklist regex, but the blacklist omitted exec, passthru, popen, show_source, create_function, register_shutdown_function, register_tick_function, and error_log. Combined with ThinkPHP's {if} template tag, which embeds the condition attribute directly into raw PHP (<?php if(condition): ?>), an authenticated administrator could inject a payload such as {if condition="exec('id > /tmp/pwned.txt')"}{/if} to achieve remote code execution. Fixed in commit 71ad3bb29570e110d8e973acff68040a3050ddf0 (2026-06-22), which added the missing functions to the filter.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 08/05/2026

The vulnerability in MacCMS10's admin template editor represents a critical remote code execution flaw that arises from insufficient input validation and filtering mechanisms within the application's administrative interface. This issue stems from the template controller located at application/admin/controller/Template.php, which implements a blacklist-based approach to prevent dangerous PHP functions from being executed within user-supplied template content. The security mechanism fails to account for several crucial PHP functions that can be leveraged for arbitrary code execution, including exec, passthru, popen, show_source, create_function, register_shutdown_function, register_tick_function, and error_log. These functions, when improperly sanitized or filtered, provide attackers with multiple vectors to bypass the existing security controls.

The technical exploitation of this vulnerability relies on the combination of two distinct elements within the application's architecture. First, the ThinkPHP framework's {if} template tag system allows for direct embedding of PHP code within template conditions through its condition attribute mechanism. This feature, while useful for conditional rendering, creates an execution path where raw PHP code can be injected and subsequently executed by the PHP interpreter. Second, the incomplete blacklist in MacCMS10's filtering logic means that these critical functions remain accessible to authenticated administrators who can manipulate template content through the administrative interface. The specific payload demonstrated in the vulnerability requires only a single line of malicious code within the template editor: {if condition="exec('id > /tmp/pwned.txt')"}{/if} This injection allows for command execution with the privileges of the web server process, bypassing the intended security boundaries.

The operational impact of this vulnerability extends beyond simple code execution, as it fundamentally undermines the application's security model by providing authenticated attackers with a persistent means to escalate privileges and compromise the entire system. An attacker who gains administrative access can leverage this vulnerability to execute arbitrary commands on the server, potentially leading to complete system compromise, data exfiltration, or further lateral movement within network infrastructure. The vulnerability affects both the confidentiality and integrity of the system, as unauthorized code execution enables attackers to modify application behavior, inject malicious content, or establish backdoors for continued access. This issue particularly impacts web applications that rely on template-based rendering systems and demonstrates the critical importance of comprehensive function filtering rather than incomplete blacklists.

The mitigation strategy for this vulnerability involves implementing a more robust security model that addresses both the immediate technical flaw and broader architectural concerns. The fix implemented in commit 71ad3bb29570e110d8e973acff68040a3050ddf0 demonstrates the correct approach by expanding the blacklist to include all dangerous PHP functions that could be exploited for code execution. This solution aligns with established security principles and follows industry best practices for preventing code injection vulnerabilities. Organizations should also consider implementing additional layers of defense including input validation, privilege separation, and regular security audits of template systems. The vulnerability serves as a clear example of how incomplete security controls can create exploitable conditions, and the fix illustrates the importance of comprehensive threat modeling that accounts for all potential attack vectors within application frameworks.

This vulnerability relates to multiple cybersecurity standards and frameworks, including CWE-94 which covers "Improper Control of Generation of Code ('Code Injection')" and CWE-74 which addresses "Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')." The ATT&CK framework categorizes this as T1059.007 "Command and Scripting Interpreter: Python" or similar execution techniques, though it specifically relates to PHP command execution. The remediation approach demonstrates principles from the OWASP Top 10, particularly addressing injection vulnerabilities and improper input validation, which are among the most prevalent security issues in web applications. This case study emphasizes that even authenticated access controls cannot prevent code execution when template systems lack proper sanitization mechanisms, highlighting the need for defense-in-depth strategies that protect against multiple attack vectors simultaneously.

Responsible

TuranSec

Reservation

08/05/2026

Disclosure

08/05/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!