Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate to Laravel application
-
DeliveryLocate media upload endpoint
-
ExploitSubmit file named shell.php.jpg or .htaccess
-
InstallBypass FileAdder defaultSanitizer blocklist
-
C2File stored with executable extension intact
-
ExecuteRequest stored file URL via Apache AddHandler
-
ImpactExecute PHP webshell as web server user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
|
| Exploitation Conditions | Attacker must hold authenticated access (CVSS PR:L) to a Laravel application using spatie/laravel-medialibrary < 11.23.0 with an exposed upload code path that invokes FileAdder's default sanitizer rather than a custom replacement. For PHP code execution via the double-extension variant (shell.php.jpg), the target web server must be Apache with a legacy AddHandler php-script (or equivalent AddType application/x-httpd-php) directive that resolves any .php-containing extension chain to the PHP interpreter - this rules out modern Nginx + PHP-FPM, Apache configurations using SetHandler with explicit file matches, and any deployment that stores uploads on a separate non-PHP-executing origin such as S3 or a CDN. The incomplete-blocklist variant (.php6, .shtml, .htaccess) does NOT require AddHandler and works against any server that recognizes those extensions, including default Apache mod_mime mappings for .shtml and per-directory .htaccess processing. Exploitation requires no user interaction (UI:N) and no special attack complexity (AC:L), and the uploaded file must be retrievable via a URL the web server processes through PHP rather than served as a static asset. |
| Impact | The CVSS 4.0 vector AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H scores 8.7 and indicates network-reachable, low-complexity exploitation by an authenticated low-privileged user with no user interaction, resulting in full confidentiality, integrity, and availability loss on the vulnerable component. EPSS, KEV, and SSVC data were not provided in the input, so probabilistic exploitation likelihood and active-exploitation status cannot be quantified here. Real-world risk is bifurcated: the double-extension path requires the target deployment to use a legacy Apache AddHandler configuration (uncommon on modern PHP-FPM/Nginx stacks but still present on shared hosting and older LAMP installs), whereas the incomplete-blocklist path (.htaccess, .shtml, .php6) works regardless of that configuration and is the more broadly exploitable variant. PR:L means the attacker must already have an authenticated upload-capable session, which limits opportunistic mass-exploitation but is trivially satisfied in any application exposing the media library to registered users. No public exploit identified at time of analysis, but the patch commit publicly documents the flaw, making PoC development straightforward. |
| Exploit ScenarioDerived | An attacker registers or logs in as a low-privileged user of a Laravel application that exposes a media library upload endpoint (for example a profile-avatar or document-upload form) and submits a file named shell.php.jpg containing PHP webshell code. Because FileAdder::defaultSanitizer() only inspects the trailing .jpg suffix, the file is accepted and stored with its .php stem intact; on a host running Apache with the legacy AddHandler php-script .php directive, the attacker then issues a GET request to the stored file's public URL and the PHP handler executes the embedded code in the web server's context. No public exploit identified at time of analysis, though the patch diff publicly discloses the bypass mechanics. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 29, 2026
File upload restriction bypass in Spatie Laravel Media Library prior to 11.23.0 allows authenticated remote attackers to upload files with double extensions (e.g., shell.php.jpg) or executable extensions missing from the blocklist (.php6, .shtml, .htaccess) due to a flawed sanitizer in FileAdder::defaultSanitizer() that only inspects the final filename suffix. Successful exploitation can lead to arbitrary PHP code execution when the application is deployed behind a legacy Apache AddHandler configuration, with no public exploit identified at time of analysis. The flaw carries a CVSS 4.0 score of 8.7 (high) reflecting high confidentiality, integrity, and availability impact.
RemediationAI
Vendor-released patch: upgrade Spatie Laravel Media Library to 11.23.0 or later via composer require spatie/laravel-medialibrary:^11.23.0, which hardens FileAdder::defaultSanitizer() per pull request https://github.com/spatie/laravel-medialibrary/pull/3939 and commit 608ea03703d3887c46434f5dda6af56de6346aba. If immediate upgrade is not possible, configure Apache to replace any AddHandler php-script directive with SetHandler application/x-httpd-php scoped only to a controlled directory (avoids extension-based dispatch but requires reviewing all virtual hosts), or move uploads onto a separate non-executing storage domain or S3-backed disk so saved files cannot be served as PHP regardless of extension. As application-layer compensating controls, override the sanitizer to reject any filename whose pathinfo extension chain contains .php, .php3, .php4, .php5, .php6, .php7, .phtml, .shtml, .htaccess, or .htm/.html with embedded PHP, and enforce server-side content-type validation against magic bytes; note that overly strict blocklists may reject legitimate filenames such as report.htaccess-backup.pdf. Vendor advisory and release notes are at https://github.com/spatie/laravel-medialibrary/releases/tag/11.23.0.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Spatie Laravel Media Library is a widely used Laravel package for associating files with Eloquent models, handling uploads, conversions, and storage. The root cause is CWE-184 (Incomplete List of Disallowed Inputs): the FileAdder::defaultSanitizer() method enforces an extension blocklist that both (1) checks only the trailing filename suffix rather than all extension components, and (2) omits several Apache-recognized executable handlers such as .php6, .shtml, and .htaccess. Compounding the issue, PHP's pathinfo() function preserves inner stems when extracting basenames, so a filename like shell.php.jpg retains its .php component on disk. When Apache is configured with the legacy AddHandler php-script .php directive, mod_mime treats any filename containing .php anywhere in its extension chain as PHP-executable, turning a stored 'image' into a webshell. The affected CPE is cpe:2.3:a:spatie:laravel-medialibrary covering all versions before 11.23.0.
Know when PHP gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Primary rating from Vendor (VulnCheck) · only source for this CVE.
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
Spatie Laravel Media Library before version 11.23.0 contains a file upload restriction bypass in FileAdder::defaultSanitizer(). The sanitizer checks only the final filename suffix, allowing double-extension filenames such as shell.php.jpg to bypass the blocklist, with pathinfo() preserving inner .php stems in saved filenames. The blocklist also omits executable extensions including .php6, .shtml, and .htaccess. The double-extension bypass requires a legacy Apache AddHandler configuration to achieve PHP execution; the incomplete blocklist bypass does not.
Executive ViewAI
Spatie Laravel Media Library versions before 11.23.0 contain a file upload validation bypass allowing authenticated users to upload executable files and achieve arbitrary PHP code execution on affected servers. Organizations running this library-particularly those with legacy Apache configurations-face direct risk of unauthorized code execution, data theft, or system compromise. This requires immediate patching to prevent exploitation by insider threats or compromised user accounts.
Vendor-released patch: Spatie Laravel Media Library 11.23.0. Interim: Disable Apache AddHandler for .php and related extensions in upload directories if patch deployment is delayed; enforce strict MIME-type validation and file storage outside webroot.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Malicious file upload attacks exploit insufficient validation when web applications accept user-provided files.
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
EUVD-2026-33439
GHSA-3ggm-c5m7-hfv5
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB