Web Application
CVE-2026-48557 high CVSS 8.8

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などの実行可能拡張子を除外しています。

❓ What is the problem

ファイルアップロード制限の迂回が可能になる脆弱性。

📍 Affected scope

Spatie Laravel Media LibraryのFileAdder::defaultSanitizer()

🔥 Severity

Double-extensionファイルがサニタイザを回避できることで、悪意あるファイルが実行可能になる可能性があります。

🔧 How to fix

バージョン11.23.0以上にアップデートしてください。

🛡️ Workaround

不完全なブロックリストを修正するか、適切なサーバー設定を確認する。

🔍 Detection

ファイルアップロードの挙動およびサーバーログをチェックして異常を検出する。

Affected packages

composer spatie/laravel-medialibrary
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"11.23.0"}]}]
Packagist spatie/laravel-medialibrary
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"11.23.0"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details