PatchSiren cyber security CVE debrief
CVE-2026-48557 spatie CVE debrief
Spatie Laravel Media Library before version 11.23.0 contains a file upload restriction bypass in the FileAdder::defaultSanitizer() method. The sanitizer validates only the final filename suffix, enabling double-extension filenames such as shell.php.jpg to bypass the blocklist. The pathinfo() function preserves 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 require such configuration.
- Vendor
- spatie
- Product
- laravel-medialibrary
- CVSS
- HIGH 8.7
- CISA KEV
- Not listed in stored evidence
- Original CVE published
- 2026-05-29
- Original CVE updated
- 2026-07-22
- Advisory published
- 2026-05-29
- Advisory updated
- 2026-07-22
Who should care
Organizations using Spatie Laravel Media Library versions prior to 11.23.0 for file upload functionality, particularly those with Apache web servers or incomplete extension blocklists. Security teams should prioritize this for applications handling untrusted file uploads from authenticated users.
Technical summary
The vulnerability exists in FileAdder::defaultSanitizer() which uses pathinfo() to extract filename components and validates only the final extension suffix. This allows attackers to upload files with double extensions (e.g., shell.php.jpg) where the inner .php is preserved in the saved filename. The blocklist also fails to include extensions such as .php6, .shtml, and .htaccess. Successful exploitation depends on server configuration: the double-extension bypass requires legacy Apache AddHandler configurations to execute PHP code, while the incomplete blocklist bypass can achieve execution without such configuration. The CVSS 4.0 vector indicates network attack vector, low attack complexity, low privileges required, no user interaction, and high impact to confidentiality, integrity, and availability.
Defensive priority
HIGH
Recommended defensive actions
- Upgrade Spatie Laravel Media Library to version 11.23.0 or later.
- Review file upload handling implementations for reliance on suffix-only validation.
- Audit web server configurations for legacy Apache AddHandler directives that may enable PHP execution of double-extension files.
- Implement additional server-side validation beyond filename extension checks, including content-type verification and file content inspection.
- Consider deploying Web Application Firewall rules to detect and block suspicious double-extension upload patterns.
Evidence notes
CVE published 2026-05-29T20:16:28.957Z; modified 2026-05-29T20:21:38.773Z. Vulncheck advisory and GitHub commit/pull request/release references provided.
Sources and references
Verified primary and authoritative sources
-
CVE-2026-48557 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2026-48557
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2026-48557 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2026-48557
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
Source reference
Unverified legacy reference
URL: https://github.com/spatie/laravel-medialibrary/commit/608ea03703d3887c46434f5dda6af56de6346aba
-
Source reference
Unverified legacy reference
URL: https://github.com/spatie/laravel-medialibrary/pull/3939
-
Source reference
Unverified legacy reference
URL: https://github.com/spatie/laravel-medialibrary/releases/tag/11.23.0
-
Source reference
Unverified legacy reference
URL: https://www.vulncheck.com/advisories/spatie-laravel-media-library-file-upload-restriction-bypass-via-fileadder-php
Methodology and review provenance
AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.