PHP code injection in PHPCMS 2008
CVE-2018-19127 is a code injection vulnerability in PHPCMS 2008. An attacker can supply PHP code through the template request parameter, causing arbitrary content to be written to a website template-cache file with an attacker-controlled filename. The generated PHP cache content incorporates a PHP function declaration substring, enabling arbitrary code execution on the affected server.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows arbitrary PHP code execution on the affected server and can enable installation of a webshell. The vulnerability also permits modification of website cache content using an attacker-controlled filename. The execution privilege level and broader system impact are not established.
If you can’t patch tonight, do this now.
Restrict access to the vulnerable /type.php endpoint until a fix is applied, especially from untrusted networks. Disable execution of PHP code in cache directories such as data/cache_template where feasible, for example through web server configuration. Apply filesystem permission hardening so the web application cannot create or modify executable files outside strictly necessary paths. Use WAF or request filtering to block suspicious requests containing PHP code in the template parameter, and monitor for unexpected .tpl.php files or changes under cache directories.
Patch, then assume compromise.
Upgrade to a fixed version of PHPCMS if a vendor patch is available, or apply the vendor-supplied fix for CVE-2018-19127. The vulnerable logic in /type.php should be changed so that untrusted input from the template parameter cannot be written into executable PHP files or cache templates. Cache files should be treated as non-executable data, filenames should not be attacker-controllable, and any dynamic template handling should enforce strict allowlisting and neutralization of PHP metacharacters and code fragments.
No public exploits tracked yet. Mallory keeps watching.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
3 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.