Vulnerability in spatie/laravel-medialibrary (CVE-2026-48557)
Summary
Vulnerability in spatie/laravel-medialibrary (CVE-2026-48557). Successful exploitation can lead to full system takeover. Mitigation: upgrade to 11.23.0 or later.
Original description
The description as published by the source.
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.
Source: NIST National Vulnerability Database NVD GitHub Advisory
AI summary
Written by an external AI model and may contain mistakes. Check the original description and references below before acting on it.
Spatie Laravel Media Libraryのバージョン11.23.0未満には、FileAdder::defaultSanitizer()におけるファイルアップロード制限の迂回の脆弱性があります。サニタイザは最終的なファイル名の拡張子のみをチェックし、.php6や.shtmlなどの実行可能拡張子を除外しています。
ファイルアップロード制限の迂回が可能になる脆弱性。
Spatie Laravel Media LibraryのFileAdder::defaultSanitizer()
Double-extensionファイルがサニタイザを回避できることで、悪意あるファイルが実行可能になる可能性があります。
バージョン11.23.0以上にアップデートしてください。
不完全なブロックリストを修正するか、適切なサーバー設定を確認する。
ファイルアップロードの挙動およびサーバーログをチェックして異常を検出する。
Affected packages
References
- advisory nvd.nist.gov
- package github.com
- web disclosure@vulncheck.com
- web disclosure@vulncheck.com
- web disclosure@vulncheck.com
- web disclosure@vulncheck.com
- web github.com