CVE-2026-48557: Spatie/laravel medialibrary Spatie Laravel Media Library Contains Vulnerability
HIGHCVE-2026-48557 is a HIGH (CVSS 8.8) spatie laravel media library contains vulnerability (CWE-184: Incomplete List of Disallowed Inputs) affecting Spatie/laravel medialibrary libraries in the Packagist ecosystem. The issue involves spatie laravel media library contains a file upload restriction bypass. Remediation is available by upgrading affected packages to version 11.23.0.
CVE-2026-48557 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-48557
To remediate this vulnerability, upgrade all affected Spatie/laravel medialibrary dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade spatie/laravel-medialibrary to 11.23.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for spatie/laravel-medialibrary
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-48557, inspect your project dependencies for Spatie/laravel medialibrary:
inspect dependencies for spatie/laravel-medialibrary
Analyze the terminal output to locate any version of Spatie/laravel medialibrary in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 11.23.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-184: Incomplete List of Disallowed Inputs, where the product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete. In Spatie/laravel medialibrary, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-48557 Affected Spatie/laravel medialibrary Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
spatie/laravel-medialibrary
|
Packagist |
< 11.23.0
|
11.23.0
|
References
Frequently Asked Questions
What is CVE-2026-48557?
Which Spatie/laravel medialibrary versions are affected?
What version fixes CVE-2026-48557?
Is spatie/laravel-medialibrary affected?
What is the CVSS score of CVE-2026-48557?
What CWE is associated with CVE-2026-48557?
How can I check Packagist dependencies for CVE-2026-48557?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3ggm-c5m7-hfv5",
"modified" : "2026-07-02T21:02:07Z",
"published" : "2026-05-29T21:31:25Z",
"aliases" : [ "CVE-2026-48557" ],
"summary" : "Spatie Laravel Media Library contains a file upload restriction bypass",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "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" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "spatie/laravel-medialibrary"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "11.23.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-48557"
}, {
"type" : "WEB",
"url" : "https://github.com/spatie/laravel-medialibrary/pull/3939"
}, {
"type" : "WEB",
"url" : "https://github.com/spatie/laravel-medialibrary/commit/608ea03703d3887c46434f5dda6af56de6346aba"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/spatie/laravel-medialibrary"
}, {
"type" : "WEB",
"url" : "https://github.com/spatie/laravel-medialibrary/releases/tag/11.23.0"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/spatie-laravel-media-library-file-upload-restriction-bypass-via-fileadder-php"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-184" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-02T21:02:07Z",
"nvd_published_at" : "2026-05-29T20:16:28Z"
}
}