Laravel-Mediable
CVE-2026-49972
HIGH
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
AC:H because RCE depends on an attacker-uncontrolled server misconfiguration executing .php-containing names; PR:L follows the vendor vector given the auth conflict; C/I/A:H reflect full webshell RCE.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
3DescriptionCVE.org
Laravel-Mediable before 7.0.0 contains a file upload vulnerability that allows unauthenticated attackers to achieve remote code execution by uploading a file with an embedded PHP extension disguised within a double extension such as shell.php.jpg. The PATHINFO_FILENAME extraction preserves the inner .php extension in the base name, and on misconfigured Apache or nginx servers that execute any filename containing .php as PHP, the stored file is interpreted as executable code while all MIME type, extension, and aggregate type validation checks pass due to the outer .jpg extension.
AnalysisAI
Remote code execution in the plank/laravel-mediable package before 7.0.0 lets attackers upload a double-extension file such as shell.php.jpg that passes all MIME, extension, and aggregate-type validation because of the trailing .jpg, yet retains an inner .php in its stored basename. On Apache/nginx servers misconfigured to execute any filename containing .php, the stored artifact runs as PHP. Reported by VulnCheck with a vendor patch in 7.0.0; there is no public exploit identified at time of analysis and it is not listed in CISA KEV.
Technical ContextAI
Laravel-Mediable is a Laravel media-management package handling uploads and attachment of files to Eloquent models. The root cause is CWE-434 (Unrestricted Upload of File with Dangerous Type): the uploader validates the outer/last extension (.jpg) and the derived MIME/aggregate type, but the filename is stored via PHP's PATHINFO_FILENAME, which strips only the final extension and thus preserves the inner .php in the base name (shell.php.jpg → basename shell.php). The vulnerability only becomes code execution when it meets a permissive web-server configuration - Apache with a loose AddHandler/SetHandler or nginx with a broad \.php location that passes any filename containing .php to the PHP-FPM handler - making this a chained application-plus-server-misconfiguration weakness. The affected artifact per CPE is cpe:2.3:a:plank:laravel-mediable:*:*:*:*:*:*:*:*.
RemediationAI
Upgrade to Laravel-Mediable 7.0.0 or later (Vendor-released patch: 7.0.0), which is a dedicated security release; apply the fix from commit 49e3583bed13423611b3391f89e6b002571eed73 per https://github.com/plank/laravel-mediable/releases/tag/7.0.0. Version 7.0.0 also introduces mediable.forbidden_file_extensions / MediaUploader::setForbiddenExtensions(), so blacklist php, phtml, php3-8, and phar after upgrading. Where immediate upgrade is not possible, harden the web server: on Apache remove broad AddHandler/SetHandler application/x-httpd-php rules and use FilesMatch "\.php$" (anchored) so only trailing-.php files execute; on nginx replace any location ~ \.php with location ~ \.php$ and add try_files $uri =404 in the PHP block - this closes the double-extension execution path with essentially no functional side effect. Additionally, store uploads outside the web root or serve them from a domain/path with PHP execution disabled (side effect: requires adjusting media-serving URLs), and rename stored files to remove any embedded .php segment.
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
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
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
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
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
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
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
Share
External POC / Exploit Code
Leaving vuln.today