Security researchers at Assetnote have identified a critical vulnerability in Craft CMS, a popular PHP-based content management system. This flaw, tracked as CVE-2024-56145 and assigned a CVSS score of 9.3, can lead to unauthenticated remote code execution (RCE) under specific configurations, posing a significant threat to affected systems. The vulnerability arises from the behavior of PHP's register_argc_argv configuration. When enabled, this setting allows query string parameters to populate the `SERVER['argv']` array, mimicking command-line arguments. While this feature can be useful in some scenarios, it inadvertently permits attackers to inject options meant for the command-line interface (CLI) through web requests. According to Assetnote, the official Craft CMS Docker image has register_argc_argv set to "On" by default, which creates the conditions necessary for exploitation. The root cause lies in the `bootstrap\bootstrap.php` file within Craft CMS, where command-line arguments are processed without verifying whether the environment is actually a CLI context. This oversight allows attackers to manipulate options such as `templatesPath` or `configPath` to force the CMS to load arbitrary files. Exploiting this flaw for RCE required innovative use of PHP's file inclusion capabilities. Initially, researchers encountered safeguards like `file_exists` checks that blocked common payloads using `php:\\filter` or HTTP file wrappers. However, they discovered that the `ftp:\\` wrapper could bypass these protections when loading template files. By hosting malicious Twig template files on a controlled FTP server, attackers could inject executable code into Craft CMS. Using Twig's `sort` filter, they further bypassed Craft's sandboxing features to execute system commands, ultimately achieving RCE. To demonstrate the exploit, security researcher Chocapikk developed a proof-of-concept (PoC) exploit in Python and shared it on GitHub, making the issue widely accessible. Craft CMS is widely used, powering over 150,000 websites, including those of major enterprises. Assetnote emphasized the widespread use of this platform across organizations monitored through their Attack Surface Management solution, underscoring the importance of addressing this vulnerability. The Craft CMS team acted swiftly, releasing patches within 24 hours of receiving the disclosure. Users are strongly advised to upgrade to Craft CMS versions 5.5.2 or 4.13.2 and newer to resolve the issue. For those unable to update immediately, disabling register_argc_argv in the `php.ini` configuration file provides a temporary mitigation.
IBM released security patches for over 100 vulnerabilities across various products. The biggest sufferers of these patches were Storage Defender, for which patches were issued for ...
Fieldtex Products, a U.S.-based provider of contract sewing and medical supply fulfillment, has reported a data breach following an attack attributed to a well-known ransomware ope...
The Pierce County Library System (PCLS) has announced a major data breach affecting more than 340,000 individuals, including library patrons, employees, former employees, and some ...