CVE-2024-47823
PHP vulnerability analysis and mitigation

Overview

Livewire, a full-stack framework for Laravel that enables dynamic UI components, was found to contain a critical vulnerability (CVE-2024-47823) in versions prior to 2.12.7 and 3.5.2. The vulnerability was discovered in October 2024 and involves improper validation of file extensions during file uploads. This security flaw affects the file upload functionality in the Livewire framework when used with Laravel applications (NVD, ASEC).

Technical details

The vulnerability stems from Livewire's method of determining file extensions based on MIME types rather than validating the actual file extension from the filename. This implementation flaw allows attackers to bypass validation checks by uploading files with valid MIME types (such as image/png) while maintaining malicious file extensions like .php. The vulnerability has received a CVSS v3.1 base score of 9.8 (Critical) and a CVSS v4.0 score of 7.7 (High), indicating its severe nature (NVD, Security Online).

Impact

When successfully exploited, this vulnerability can lead to Remote Code Execution (RCE) on affected systems. The impact is particularly severe when three specific conditions are met: the filename is composed using $file->getClientOriginalName(), files are stored directly on the server in a public storage disk, and the webserver is configured to execute .php files. This combination of conditions could allow attackers to execute malicious code on the target server (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in Livewire versions 2.12.7 and 3.5.2. Users are strongly advised to upgrade to these or later versions immediately. The fix involves changing how file extensions are validated, now using the actual file extension from the uploaded file rather than deriving it from the MIME type. Additionally, it is recommended to always validate both the MIME type and file extension in file upload implementations (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management