The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2024-21546

CVE-2024-21546: Laravel FileManager RCE Vulnerability

CVE-2024-21546 is a remote code execution vulnerability in unisharp/laravel-filemanager that allows attackers to execute malicious code by bypassing file upload restrictions. This article covers technical details, affected versions, and mitigation.

Published: April 1, 2026

CVE-2024-21546 Overview

CVE-2024-21546 is a Remote Code Execution (RCE) vulnerability affecting the UniSharp Laravel-Filemanager package before version 2.9.1. The vulnerability allows attackers to execute malicious code by uploading a file with a valid MIME type while inserting a dot (.) character after the .php file extension. This technique bypasses file extension validation, enabling the execution of arbitrary PHP code on the server.

Critical Impact

Successful exploitation allows remote attackers to execute arbitrary code on affected servers, potentially leading to complete system compromise, data theft, and lateral movement within the network.

Affected Products

  • UniSharp Laravel-Filemanager versions prior to 2.9.1
  • Laravel applications implementing the vulnerable file manager package
  • Web servers hosting applications with the unpatched package

Discovery Timeline

  • 2024-12-18 - CVE-2024-21546 published to NVD
  • 2025-08-26 - Last updated in NVD database

Technical Details for CVE-2024-21546

Vulnerability Analysis

This vulnerability is classified as CWE-94 (Improper Control of Generation of Code, or Code Injection). The Laravel-Filemanager package fails to properly sanitize file extensions during the upload process. Specifically, the validation logic does not account for special characters such as the dot (.) character being appended after legitimate PHP file extensions.

When a malicious actor uploads a file with an extension like malicious.php. and provides a valid MIME type, the server processes the file and stores it with executable permissions. Depending on server configuration, the trailing dot may be ignored during execution, causing the web server to interpret the file as PHP code and execute its contents.

The attack is network-accessible and requires no authentication or user interaction, making it particularly dangerous for publicly exposed Laravel applications using this file management package.

Root Cause

The root cause lies in insufficient input validation within the file upload handling mechanism. The original implementation validated MIME types but failed to properly sanitize or reject file extensions containing special characters. This allowed attackers to craft filenames that passed MIME type checks while still being executable as PHP files.

Attack Vector

The attack leverages the network-accessible file upload functionality in Laravel-Filemanager. An attacker crafts a malicious PHP file and renames it with an extension containing a trailing dot (e.g., shell.php.). By setting a valid MIME type in the HTTP request, the file bypasses extension validation. Once uploaded to the server, the PHP interpreter may execute the file, allowing arbitrary code execution under the web server's user context.

The security patch introduces proper extension validation by adding an InvalidExtensionException class that rejects file extensions containing special characters:

php
<?php

namespace UniSharp\LaravelFilemanager\Exceptions;

class InvalidExtensionException extends \Exception
{
    public function __construct()
    {
        $this->message = 'File extension is not valid.';
    }
}

Source: GitHub Commit

The patch also updates the LfmUploadValidator.php to use this new exception for proper validation:

php
use UniSharp\LaravelFilemanager\Exceptions\FileFailedToUploadException;
use UniSharp\LaravelFilemanager\Exceptions\FileSizeExceedConfigurationMaximumException;
use UniSharp\LaravelFilemanager\Exceptions\FileSizeExceedIniMaximumException;
use UniSharp\LaravelFilemanager\Exceptions\InvalidExtensionException;
use UniSharp\LaravelFilemanager\Exceptions\InvalidMimeTypeException;
use UniSharp\LaravelFilemanager\LfmPath;

Source: GitHub Commit

Detection Methods for CVE-2024-21546

Indicators of Compromise

  • Presence of PHP files with unusual extensions containing trailing dots or special characters in upload directories
  • Web server logs showing POST requests to Laravel-Filemanager upload endpoints with suspicious filenames
  • Unexpected PHP files in the public/uploads or configured storage directories
  • Web shell activity or unauthorized command execution from the web server user account

Detection Strategies

  • Monitor file upload endpoints for requests containing filenames with special characters after .php extensions
  • Implement file integrity monitoring (FIM) on upload directories to detect unauthorized PHP files
  • Configure web application firewall (WAF) rules to block uploads with suspicious file extension patterns
  • Review web server access logs for anomalous POST requests to /laravel-filemanager/ routes

Monitoring Recommendations

  • Enable verbose logging for the Laravel-Filemanager package and monitor for upload validation failures
  • Set up alerts for any new PHP files created in upload directories
  • Deploy endpoint detection and response (EDR) solutions to monitor for web shell behavior
  • Implement network traffic analysis to detect potential command-and-control communications from compromised servers

How to Mitigate CVE-2024-21546

Immediate Actions Required

  • Upgrade UniSharp Laravel-Filemanager to version 2.9.1 or later immediately
  • Review upload directories for any suspicious PHP files and remove unauthorized content
  • Audit web server logs for evidence of exploitation attempts
  • Consider temporarily disabling file upload functionality until patching is complete

Patch Information

The vulnerability has been addressed in Laravel-Filemanager version 2.9.1. The security fix introduces the InvalidExtensionException class and updates the upload validator to reject file extensions containing special characters. The patch is available through the GitHub commit and can be applied by updating the package via Composer. Additional technical details are available in the Snyk Vulnerability Report.

Workarounds

  • Configure web server rules to prevent execution of PHP files in upload directories using .htaccess or nginx configuration
  • Implement additional server-side validation to reject files with extensions containing special characters
  • Restrict file upload functionality to authenticated and authorized users only
  • Store uploaded files outside the web root to prevent direct execution
bash
# Nginx configuration to prevent PHP execution in upload directories
location ~* /uploads/.*\.php$ {
    deny all;
    return 403;
}

# Apache .htaccess rule for upload directories
# Add to your uploads directory
# php_flag engine off
# AddHandler default-handler .php

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechUnisharp Laravel Filemanager

  • SeverityHIGH

  • CVSS Score8.9

  • EPSS Probability2.44%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-94
  • Technical References
  • GitHub Gist Code Snippet

  • GitHub Commit Note

  • Snyk Vulnerability Report
  • Latest CVEs
  • CVE-2026-35467: Browser API Key Information Disclosure

  • CVE-2026-35466: cveInterface.js XSS Vulnerability

  • CVE-2026-30252: ZenShare Suite XSS Vulnerability

  • CVE-2026-30251: ZenShare Suite v17.0 XSS Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English