CVE-2026-48557 Details
Description
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.
A file upload restriction bypass vulnerability has been identified in Spatie Laravel Media Library versions prior to 11.23.0. The issue resides in the default file name sanitizer, which only checks the final file extension. This oversight allows double-extension files, such as 'shell.php.jpg', to circumvent the blocklist, as 'pathinfo()' retains the inner '.php' portion in the saved file name. Additionally, the blocklist fails to include certain executable extensions like '.php6', '.shtml', and '.htaccess'. While the double-extension bypass can be exploited to execute PHP files under a legacy Apache AddHandler configuration, the general blocklist oversight does not require such conditions.
Users can update to Spatie Laravel Media Library version 11.23.0 or later, where this vulnerability has been addressed. For those unable to update, the blocked extensions can be configured in 'media-library.php'.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed May 29, 2026CISA-ADP
Assessed May 29, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-184 | Incomplete List of Disallowed Inputs | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Spatie Laravel Media Library | < 11.23.0 (semver) |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 22, 2026 | CVE Translated | [email protected] |
| Jul 14, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 29, 2026 | New CVE Received | [email protected] |
Volerion