CVE-2024-56145

CRITICAL KEV NUCLEI LAB

Craft CMS Twig Template Injection RCE via FTP Templates Path

Title source: metasploit
STIX 2.1

Exploitation Summary

CVE-2024-56145 is actively exploited and listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, added June 2, 2025. EIP tracks 4 public exploits from researchers including Chocapikk, Sachinart, hmhlol, including a Metasploit module exploits/linux/http/craftcms_ftp_template. A Nuclei detection template is also available.

AI-analyzed exploit summary This repository contains a functional exploit for CVE-2024-56145, targeting a Remote Code Execution (RCE) vulnerability in Craft CMS. The exploit leverages improper handling of user-supplied template paths to achieve RCE via a crafted FTP server and reverse shell payloads.

Description

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.

Exploits (4)

nomisec WORKING POC 49 stars
by Chocapikk · remote
https://github.com/Chocapikk/CVE-2024-56145

This repository contains a functional exploit for CVE-2024-56145, targeting a Remote Code Execution (RCE) vulnerability in Craft CMS. The exploit leverages improper handling of user-supplied template paths to achieve RCE via a crafted FTP server and reverse shell payloads.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Craft CMS 5.5.0
No auth needed
Prerequisites: Network access to the target Craft CMS instance · Ability to host an FTP server · Listener setup for reverse shell
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 4 stars
by Sachinart · remote
https://github.com/Sachinart/CVE-2024-56145-craftcms-rce

This repository contains a functional exploit for CVE-2024-56145, targeting CraftCMS via template path manipulation and SSTI (Server-Side Template Injection). The PoC includes an FTP server to serve malicious templates and multiple payloads for command execution.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: CraftCMS (version not specified)
No auth needed
Prerequisites: Network access to target CraftCMS instance · Ability to host an FTP server · Target must be vulnerable to template path manipulation
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by hmhlol · poc
https://github.com/hmhlol/craft-cms-RCE-CVE-2024-56145

This repository provides a lab environment to reproduce CVE-2024-56145, an RCE vulnerability in CraftCMS when `register_argc_argv` is enabled in php.ini. It includes Docker setup and configuration files to simulate the vulnerable environment.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: CraftCMS (version not specified)
No auth needed
Prerequisites: PHP with `register_argc_argv` enabled · Docker for lab setup
devstral-2 · analyzed Feb 16, 2026 Full analysis →
metasploit WORKING POC EXCELLENT
by jheysel-r7, Valentin Lobstein, AssetNote · rubypoc
https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/craftcms_ftp_template.rb

This Metasploit module exploits a Twig template injection vulnerability in Craft CMS by abusing the --templatesPath argument to load arbitrary templates via FTP, leading to Remote Code Execution (RCE). It sets up a fake FTP server to serve malicious Twig templates that execute system commands when rendered by the vulnerable Craft CMS instance.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Craft CMS (versions affected by CVE-2024-56145)
No auth needed
Prerequisites: Network access to the target Craft CMS instance · Ability to make the target connect to an attacker-controlled FTP server
devstral-2 · analyzed Feb 16, 2026 Full analysis →

Nuclei Templates (1)

Craft CMS - Remote Code Execution via Template Path Manipulation
CRITICALVERIFIEDby jackhax
Shodan: http.html:"craftcms" || http.favicon.hash:"-47932290"
FOFA: icon_hash=-47932290 || body=craftcms

Scores

CVSS v3 9.8
EPSS 0.9393
EPSS Percentile 99.9%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation active
Automatable yes
Technical Impact total

Details

CISA KEV 2025-06-02
VulnCheck KEV 2025-05-27
ENISA EUVD EUVD-2024-3545
CWE
CWE-94
Status published
Products (2)
craftcms/cms 5.0.0-RC1 - 5.5.2Packagist
craftcms/craft_cms 3.0.0 - 3.9.14
Published Dec 18, 2024
KEV Added Jun 02, 2025
Tracked Since Feb 18, 2026