Vulnerability in spatie/laravel-medialibrary
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
Spatie Laravel Media Libraryには、ファイルアップロードの拒否リストを回避される脆弱性があります。二重拡張子のファイル名(例: shell.php.jpg)などが検査をすり抜けるため、影響を受けるのは11.23.0より前のバージョンです。修正版の11.23.0以降へ更新してください。
ファイルアップロード制限の迂回が可能になる脆弱性。
Spatie Laravel Media LibraryのFileAdder::defaultSanitizer()
Double-extensionファイルがサニタイザを回避できることで、悪意あるファイルが実行可能になる可能性があります。
バージョン11.23.0以上にアップデートしてください。
不完全なブロックリストを修正するか、適切なサーバー設定を確認する。
ファイルアップロードの挙動およびサーバーログをチェックして異常を検出する。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| composerspatie/laravel-medialibrary |
< 11.23.0→ 11.23.0 |
11.23.0 |
| Packagistspatie/laravel-medialibrary |
< 11.23.0→ 11.23.0 |
11.23.0 |
| spatielaravel-medialibrary |
< 11.23.0→ 11.23.0 |
11.23.0 |
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
References
- advisory github.com
- advisory vulncheck.com
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- patch github.com
- patch github.com
- web github.com