Skip to main content

Spatie Laravel Media Library CVE-2026-48557

| EUVDEUVD-2026-33439 HIGH
Incomplete List of Disallowed Inputs (CWE-184)
2026-05-29 VulnCheck GHSA-3ggm-c5m7-hfv5
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Authenticate to Laravel application
  2. Delivery
    Locate media upload endpoint
  3. Exploit
    Submit file named shell.php.jpg or .htaccess
  4. Install
    Bypass FileAdder defaultSanitizer blocklist
  5. C2
    File stored with executable extension intact
  6. Execute
    Request stored file URL via Apache AddHandler
  7. Impact
    Execute PHP webshell as web server user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
Exploitation Conditions

Attacker must hold authenticated access (CVSS PR:L) to a Laravel application using spatie/laravel-medialibrary < 11.23.0 with an exposed upload code path that invokes FileAdder's default sanitizer rather than a custom replacement. For PHP code execution via the double-extension variant (shell.php.jpg), the target web server must be Apache with a legacy AddHandler php-script (or equivalent AddType application/x-httpd-php) directive that resolves any .php-containing extension chain to the PHP interpreter - this rules out modern Nginx + PHP-FPM, Apache configurations using SetHandler with explicit file matches, and any deployment that stores uploads on a separate non-PHP-executing origin such as S3 or a CDN. The incomplete-blocklist variant (.php6, .shtml, .htaccess) does NOT require AddHandler and works against any server that recognizes those extensions, including default Apache mod_mime mappings for .shtml and per-directory .htaccess processing. Exploitation requires no user interaction (UI:N) and no special attack complexity (AC:L), and the uploaded file must be retrievable via a URL the web server processes through PHP rather than served as a static asset.

Impact

The CVSS 4.0 vector AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H scores 8.7 and indicates network-reachable, low-complexity exploitation by an authenticated low-privileged user with no user interaction, resulting in full confidentiality, integrity, and availability loss on the vulnerable component. EPSS, KEV, and SSVC data were not provided in the input, so probabilistic exploitation likelihood and active-exploitation status cannot be quantified here. Real-world risk is bifurcated: the double-extension path requires the target deployment to use a legacy Apache AddHandler configuration (uncommon on modern PHP-FPM/Nginx stacks but still present on shared hosting and older LAMP installs), whereas the incomplete-blocklist path (.htaccess, .shtml, .php6) works regardless of that configuration and is the more broadly exploitable variant. PR:L means the attacker must already have an authenticated upload-capable session, which limits opportunistic mass-exploitation but is trivially satisfied in any application exposing the media library to registered users. No public exploit identified at time of analysis, but the patch commit publicly documents the flaw, making PoC development straightforward.

Exploit ScenarioDerived

An attacker registers or logs in as a low-privileged user of a Laravel application that exposes a media library upload endpoint (for example a profile-avatar or document-upload form) and submits a file named shell.php.jpg containing PHP webshell code. Because FileAdder::defaultSanitizer() only inspects the trailing .jpg suffix, the file is accepted and stored with its .php stem intact; on a host running Apache with the legacy AddHandler php-script .php directive, the attacker then issues a GET request to the stored file's public URL and the PHP handler executes the embedded code in the web server's context. No public exploit identified at time of analysis, though the patch diff publicly discloses the bypass mechanics.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 29, 2026

File upload restriction bypass in Spatie Laravel Media Library prior to 11.23.0 allows authenticated remote attackers to upload files with double extensions (e.g., shell.php.jpg) or executable extensions missing from the blocklist (.php6, .shtml, .htaccess) due to a flawed sanitizer in FileAdder::defaultSanitizer() that only inspects the final filename suffix. Successful exploitation can lead to arbitrary PHP code execution when the application is deployed behind a legacy Apache AddHandler configuration, with no public exploit identified at time of analysis. The flaw carries a CVSS 4.0 score of 8.7 (high) reflecting high confidentiality, integrity, and availability impact.

RemediationAI

Vendor-released patch: upgrade Spatie Laravel Media Library to 11.23.0 or later via composer require spatie/laravel-medialibrary:^11.23.0, which hardens FileAdder::defaultSanitizer() per pull request https://github.com/spatie/laravel-medialibrary/pull/3939 and commit 608ea03703d3887c46434f5dda6af56de6346aba. If immediate upgrade is not possible, configure Apache to replace any AddHandler php-script directive with SetHandler application/x-httpd-php scoped only to a controlled directory (avoids extension-based dispatch but requires reviewing all virtual hosts), or move uploads onto a separate non-executing storage domain or S3-backed disk so saved files cannot be served as PHP regardless of extension. As application-layer compensating controls, override the sanitizer to reject any filename whose pathinfo extension chain contains .php, .php3, .php4, .php5, .php6, .php7, .phtml, .shtml, .htaccess, or .htm/.html with embedded PHP, and enforce server-side content-type validation against magic bytes; note that overly strict blocklists may reject legitimate filenames such as report.htaccess-backup.pdf. Vendor advisory and release notes are at https://github.com/spatie/laravel-medialibrary/releases/tag/11.23.0.

Affected VersionsENISA

laravel-medialibrary 0 <11.23.0

Affected Packages

composer spatie/laravel-medialibrary fix: 11.23.0
euvd laravel_medialibrary fix: 11.23.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Spatie Laravel Media Library is a widely used Laravel package for associating files with Eloquent models, handling uploads, conversions, and storage. The root cause is CWE-184 (Incomplete List of Disallowed Inputs): the FileAdder::defaultSanitizer() method enforces an extension blocklist that both (1) checks only the trailing filename suffix rather than all extension components, and (2) omits several Apache-recognized executable handlers such as .php6, .shtml, and .htaccess. Compounding the issue, PHP's pathinfo() function preserves inner stems when extracting basenames, so a filename like shell.php.jpg retains its .php component on disk. When Apache is configured with the legacy AddHandler php-script .php directive, mod_mime treats any filename containing .php anywhere in its extension chain as PHP-executable, turning a stored 'image' into a webshell. The affected CPE is cpe:2.3:a:spatie:laravel-medialibrary covering all versions before 11.23.0.

Know when PHP gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.7 HIGH
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

Primary rating from Vendor (VulnCheck) · only source for this CVE.

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
May 29, 2026 - 20:22 NVD
8.8 (HIGH) 8.7 (HIGH)
CVE Published
May 29, 2026 - 19:49 nvd
HIGH 8.7

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Spatie Laravel Media Library versions before 11.23.0 contain a file upload validation bypass allowing authenticated users to upload executable files and achieve arbitrary PHP code execution on affected servers. Organizations running this library-particularly those with legacy Apache configurations-face direct risk of unauthorized code execution, data theft, or system compromise. This requires immediate patching to prevent exploitation by insider threats or compromised user accounts.

Business Impact: High
Compensating Controls

Vendor-released patch: Spatie Laravel Media Library 11.23.0. Interim: Disable Apache AddHandler for .php and related extensions in upload directories if patch deployment is delayed; enforce strict MIME-type validation and file storage outside webroot.

Threat Intelligence Overview

EPSS Score
0.1%
Top 72% exploitable
Threat Intel
1
1 source
Social Media
2
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Malicious file upload attacks exploit insufficient validation when web applications accept user-provided files.

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy