CVE-2018-19127: PHP code injection in PHPCMS 2008
- Vendor
- Phpcms
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.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
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.
Mitigation
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.
Remediation
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.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Frequently asked questions
- Is CVE-2018-19127 exploited in the wild?
- Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild.
- Is there a public exploit for CVE-2018-19127?
- As of Oct 16, 2026, Mallory has found no public exploit for CVE-2018-19127.
- Is there a patch for CVE-2018-19127?
- 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.
- What products are affected by CVE-2018-19127?
- Phpcms.
- How severe is CVE-2018-19127?
- CVE-2018-19127 has a CVSS v3 score of 9.8 (Critical) and an EPSS score of 20.8% (98th percentile) as of Oct 16, 2026.
Recent activity
3 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.