Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.4%top 64%

Laravel medialibrary: Spatie Laravel Media Library contains a file upload restriction bypass (CVE-2026-48557)

0
High
Published: 05/29/2026 (05/29/2026, 21:31:25 UTC)
Source: GCVE Database
Vendor/Project: spatie
Product: 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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected software

Packagistmore threats →ai
spatie/laravel-medialibrary
pkg:composer/spatie/laravel-medialibrary
Affected versions
<11.23.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/29/2026, 21:06:27 UTC

Technical Analysis

The vulnerability in Spatie Laravel Media Library (before version 11.23.0) is due to insufficient sanitization in the FileAdder::defaultSanitizer() function. The sanitizer validates only the last file extension, enabling attackers to upload files with double extensions that bypass the blocklist. The blocklist also does not include some executable extensions such as .php6, .shtml, and .htaccess. Successful exploitation to execute PHP code depends on the presence of legacy Apache AddHandler configurations. This flaw permits bypassing file upload restrictions, potentially allowing malicious file uploads.

Potential Impact

This vulnerability allows attackers to bypass file upload restrictions and upload files with disallowed extensions by using double extensions or omitted executable extensions. If the server uses legacy Apache AddHandler configurations, this can lead to remote code execution via uploaded PHP files. The impact is high due to the potential for unauthorized code execution on affected systems.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, users should review and enhance file upload validation to check all file extensions, including double extensions and omitted executable types. Additionally, disabling legacy Apache AddHandler configurations can reduce the risk of exploitation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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: 05/29/2026, 21:01:38 UTC

Last enriched: 07/29/2026, 21:06:27 UTC

Last updated: 07/31/2026, 21:27:10 UTC

Views: 100

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses