CVE-2026-48557: Incomplete List of Disallowed Inputs in spatie laravel-medialibrary
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.
AI Analysis
Technical Summary
The vulnerability in Spatie Laravel Media Library before version 11.23.0 arises from an incomplete list of disallowed file extensions in the FileAdder::defaultSanitizer() method. The sanitizer validates only the final file extension, which allows filenames with double extensions (e.g., shell.php.jpg) to bypass the blocklist. The inner executable extension (.php) remains preserved in the saved filename due to pathinfo() behavior. Furthermore, the blocklist does not include certain executable extensions like .php6, .shtml, and .htaccess, increasing the risk of malicious file uploads. Exploiting the double-extension bypass to achieve PHP execution requires a legacy Apache AddHandler configuration. The vulnerability is tracked as CWE-184 (Incomplete Neutralization of Special Elements).
Potential Impact
Successful exploitation could allow an attacker with at least low privileges to upload files that bypass the intended file upload restrictions. This may lead to the storage of files with executable extensions or double extensions that could be executed on the server under specific legacy Apache configurations, potentially enabling remote code execution. The vulnerability has a CVSS 4.0 score of 8.7, indicating high severity. However, no known exploits have been reported in the wild to date.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no official fix or patch is currently documented, users should monitor for updates from Spatie regarding version 11.23.0 or later. Until a patch is available, consider implementing additional server-side validation to reject files with suspicious double extensions and explicitly block all known executable extensions, including .php6, .shtml, and .htaccess. Review and harden Apache configurations to avoid legacy AddHandler directives that could enable execution of such files.
CVE-2026-48557: Incomplete List of Disallowed Inputs in spatie laravel-medialibrary
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.
CVSS v4.0
Score 8.7high
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Spatie Laravel Media Library before version 11.23.0 arises from an incomplete list of disallowed file extensions in the FileAdder::defaultSanitizer() method. The sanitizer validates only the final file extension, which allows filenames with double extensions (e.g., shell.php.jpg) to bypass the blocklist. The inner executable extension (.php) remains preserved in the saved filename due to pathinfo() behavior. Furthermore, the blocklist does not include certain executable extensions like .php6, .shtml, and .htaccess, increasing the risk of malicious file uploads. Exploiting the double-extension bypass to achieve PHP execution requires a legacy Apache AddHandler configuration. The vulnerability is tracked as CWE-184 (Incomplete Neutralization of Special Elements).
Potential Impact
Successful exploitation could allow an attacker with at least low privileges to upload files that bypass the intended file upload restrictions. This may lead to the storage of files with executable extensions or double extensions that could be executed on the server under specific legacy Apache configurations, potentially enabling remote code execution. The vulnerability has a CVSS 4.0 score of 8.7, indicating high severity. However, no known exploits have been reported in the wild to date.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no official fix or patch is currently documented, users should monitor for updates from Spatie regarding version 11.23.0 or later. Until a patch is available, consider implementing additional server-side validation to reject files with suspicious double extensions and explicitly block all known executable extensions, including .php6, .shtml, and .htaccess. Review and harden Apache configurations to avoid legacy AddHandler directives that could enable execution of such files.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-05-21T18:34:46.418Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
- Gcve Source
- db.gcve.eu
Threat ID: 6a19feb2e29bf47b500fc28b
Added to database: 5/29/2026, 9:01:38 PM
Last enriched: 5/29/2026, 9:03:51 PM
Last updated: 5/31/2026, 4:53:43 AM
Views: 12
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.