This module exploits a Twig template injection vulnerability in Craft CMS by abusing the --templatesPath argument. The vulnerability allows arbitrary template loading via FTP, leading to Remote Code Execution (RCE).
Exploit database
Vulnerability
CVE-2024-56145
RCE when PHP `register_argc_argv` config setting is enabled in craftcms/cms
Vulnerability details
- Score
- 9.3
- Severity
- critical
CVSS 4.0 · GitHub_M
Vector string
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NDescription
Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond. Users of affected versions are affected by this vulnerability if their php.ini configuration has `register_argc_argv` enabled. For these users an unspecified remote code execution vector is present. Users are advised to update to version 3.9.14, 4.13.2, or 5.5.2. Users unable to upgrade should disable `register_argc_argv` to mitigate the issue.
CVE ProgramExploit source choices
4 sourcesCraft CMS Twig Template Injection RCE via FTP Templates Path
2024-12-19craftcms_ftp_template.rb
chocapikk/cve-2024-56145
Unauthenticated RCE on CraftCMS when PHP `register_argc_argv` config setting is enabled
2024-12-207 files · 48 stars
craftcms/security-patches
Provides security patches for out-of-date Craft CMS installs
2025-04-118 files · 26 stars
sachinart/cve-2024-56145-craftcms-rce
CVE-2024-56145 SSTI to RCE - twig templates
2024-12-223 files · 4 stars