CVE-2024-56145 is an unauthenticated remote code execution vulnerability in Craft CMS. When PHP is configured with register_argc_argv enabled, web-request query-string values populate the argv server variable. Craft CMS bootstrap logic processes command-line-style options from that variable without confirming CLI execution, allowing an attacker to override application path configuration through a web request. An attacker can redirect the template location to attacker-controlled content available through the FTP stream wrapper; Craft CMS then retrieves and renders a malicious Twig template. The Twig callback restrictions can be bypassed through the sort filter and call_user_func, resulting in operating-system command execution.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
3 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).
This repository contains a single Metasploit module (modules/exploits/linux/http/craftcms_ftp_template.rb) that exploits a Twig template injection vulnerability (CVE-2024-56145) in Craft CMS. The exploit abuses the --templatesPath argument to force the CMS to load templates from an attacker-controlled FTP server. The module sets up an FTP server, serves a malicious Twig template that executes arbitrary system commands, and triggers the vulnerability via an HTTP GET request to the target. The payload is customizable and allows for remote code execution on the target server. The module is weaponized, supporting custom payloads and full integration with the Metasploit framework. The main attack vectors are network-based, involving both HTTP and FTP protocols. The module references the CVE, relevant research, and is structured according to Metasploit conventions.
This repository is a functional exploit tool targeting CVE-2024-56145, a Remote Code Execution (RCE) vulnerability in Craft CMS (notably version 5.5.0). The exploit is implemented in Python (exploit.py) and provides both vulnerability checking and exploitation capabilities via a command-line interface. The tool can: - Check if a target Craft CMS instance is vulnerable by sending a crafted HTTP GET request with a special parameter (--configPath). - Exploit the vulnerability by: 1. Generating a malicious template file containing a reverse shell payload (with options for bash, nc, or mkfifo shells). 2. Hosting these files on a local FTP server. 3. Triggering the target Craft CMS to fetch the malicious template via the --templatesPath parameter, pointing to the attacker's FTP server. 4. Starting a listener to catch the reverse shell connection from the target. The repository contains two main code files: exploit.py (the main Python exploit) and exploit.gyat (an obfuscated or alternative version, possibly for use with a custom interpreter). The requirements.txt lists necessary Python dependencies. The README.md provides detailed usage instructions, setup guidance for a vulnerable lab, and command-line options. The exploit requires the attacker to control an FTP server and a listener for the reverse shell. The main attack vector is network-based, leveraging HTTP(S) and FTP protocols. The tool is operational and provides a working reverse shell payload, but is not part of a larger exploitation framework.
This repository contains two main Python scripts (poc.py and poc-2.py) and a README.md. The primary exploit (poc.py) is a multi-threaded, multi-process tool designed to identify and exploit a Server-Side Template Injection (SSTI) vulnerability in CraftCMS (using the Twig template engine). The exploit works by: 1. Setting up a malicious FTP server (on port 6666 by default) that serves specially crafted Twig template payloads capable of executing arbitrary commands on the target server. 2. Scanning a list of target URLs (provided via a file) and attempting to trigger the vulnerability by making HTTP requests with the --templatesPath parameter pointing to the attacker's FTP server. 3. If the target is vulnerable, the script can execute arbitrary commands (default: 'id') and records the output in 'vulnerable.txt'. The secondary script (poc-2.py) is a simplified FTP server for manual testing, serving a basic SSTI payload. The README provides usage instructions, including how to run the scripts, configure the attacker's IP, and interpret results. The exploit requires the attacker to have a public-facing server to host the FTP service and targets CraftCMS instances that allow remote template loading via the --templatesPath parameter. The attack vector is network-based, leveraging both HTTP and FTP protocols. The repository is operational, providing real command execution on vulnerable targets.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
14 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
An unauthenticated remote code execution vulnerability in Craft CMS caused by improper handling of PHP $_SERVER['argv'] when register_argc_argv is enabled. Query-string values can supply Craft CLI options, including a remote FTP templates path; a Twig sandbox bypass using call_user_func can then execute arbitrary system commands.
A remote code execution vulnerability in Craft CMS with a proof-of-concept exploit published.
A remote code execution vulnerability in Craft CMS when a specific PHP configuration (register_argc_argv) is enabled.
A code injection vulnerability in Craft CMS that can allow arbitrary PHP code execution and potential privilege gain.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.